Improve some queries in project list MRs API endpoint

What does this MR do and why?

Adding + 0 helps postgres not to use a non-efficient query plan.

Here are some before and after tests:

Projects API queries

Projects GraphQL query

Disclaimer: The postgres.ai execution times (the BEFORE) seem to be way slower than production. I don't see these queries taking this long on production when I profiled the endpoints.

References

#552376 (comment 2611544544)

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #552376 (closed)

Edited by Patrick Bajao

Merge request reports

Loading