Skip to content

Conversation

@Rader
Copy link
Collaborator

@Rader Rader commented Aug 25, 2025

Background

The query on the recom_repo_scores table for model trending sorts isn't using an index, which causes numerous slow queries when users visit the model home page.

Solution

  1. Add a special index to the recom_repo_scores table.
  2. Add an API cache. The cache will only be used when an anonymous user visits and is not performing a search. Other scenarios, such as caching for the dataset homepage, can be considered for future implementation.

Why wasn't caching added for logged-in users?

Because logged-in users may be querying models visible within their organizations. If a user's organization changes, the cache could lead to data inconsistency.

@blaji-villeb106

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants