Skip to content

Eliminate unnecessary queries that add ~500 ms of load time for a large issue

Stan Hu requested to merge sh-fix-unnecessary-queries into master

Looking at the SQL log for issue 1, we see useless queries such as:

D, [2017-03-22T03:25:00.726710 #2629] DEBUG -- :    (235.9ms)  SELECT MAX("project_authorizations"."access_level") AS maximum_access_level, "project_authorizations"."user_id" AS project_authorizations_user_id FROM "project_authorizations" WHERE "project_authorizations"."project_id" = 13083 AND 1=0 GROUP BY "project_authorizations"."user_id"  [["project_id", 13083]]

Merge request reports

Loading