-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Needed: design decisionA core team decision is requiredA core team decision is required
Description
After a few different attempts, it seems like the query complexity added with prefetching causes queries to take much longer than without prefetching (however query count is much much lower, 30 vs 120 queries).
For more background on the removal, see:
The most expensive queries here are getting the latest build (which I think can be external) and getting the latest, non-external, successful build.
Some options here are:
- Use caching after database query. Saves some lookups but initial is still expensive and savings inconsistent.
- Use materialized views to cache at the database level. Managing these views is harder and outside ORM
- Use an intermediate table for latest/latest successful build on Project. This requires updating the relationship after each build.
Metadata
Metadata
Assignees
Labels
Needed: design decisionA core team decision is requiredA core team decision is required