Skip to content

Use SQL functon for find_by(id:) queries

Adam Hegyi requested to merge ah-primary-key-lookups-improvement into master

What does this MR do and why?

Use SQL functon for find_by(id:) queries

This change will use an SQL function when using find_by(id: x) or find_by!(id: y) for Project, Namespace and User models. The change is behind a feature flag.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports