Skip to content

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?

What are the relevant issue numbers?

Closes #23106 (closed)

Merge request reports

Loading