Closed GeoffreyHuck closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
9c1b170
) to head (eaf2596
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
We check the permissions before instead of inside the big query.
The use of
WITH...
to check the permissions made the whole query slow. This is weird because the query to check the permissions itself is very fast, but it looks it messes with the optimizer in some way.Another problem appeared as the query got very big (8 items in the path), it would spend a lot of time in
state=statistics
. Removing theWITH...
altogether before fixes it (probably the algorithm to determine the order to do the JOINs gets very slow when there are many JOINs + WITH).