France-ioi / AlgoreaBackend

Backend for the new Algorea platform
MIT License
1 stars 2 forks source link

Fix slow query: switch the two where conditions. #1060

Closed GeoffreyHuck closed 3 months ago

GeoffreyHuck commented 3 months ago

First the condition on parent_item_id, and then the NOT IN makes the query a lot faster!

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (8ac324d) to head (362760d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1060 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 236 236 Lines 14225 14226 +1 ========================================= + Hits 14225 14226 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.