Optimize Event queries by removing default order
What does this MR do?
Optimize Event queries by removing default order by id scope
Are there points in the code the reviewer needs to double check?
Yes. I had to alter specs that were expecting the events to come in a given order. I think they were just written like that, but the actual code does not depend on Event order as far as I and the rest of the specs can tell, but another pair of eyes checking this is beneficial.
Why was this MR needed?
Event queries are amongst the slowest in GitLab.com because of the unnecessary ORDER BY
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #23106 (closed)