Revert "Merge branch '373285-fix-n-1-queries-for-epic-label_links' into 'master'"
What does this MR do and why?
With !97705 (merged) we preloaded label_links
association for labels when querying epics. The resulting query can be very slow if there is a large number of labels resulting in degraded performance.
The previous N+1 queries were:
SELECT "labels".* FROM "labels" INNER JOIN "label_ links" ON "labels"."id" = "label links"."label
_id" WHERE "label _links"."target_id" = 374092 AND "label_links"."target _type" = 'Epic' ORDER BY "labels". "title" ASC, "labels"."id" DESC LIMIT 100
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eugenia Grieff