add an index to the ghost column
What does this MR do?
Adds an index to the :ghost
column for users.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Only one user ever has :ghost
set to true, and we look that up using User.ghost
pretty frequently. Without an index, this will perform a full table scan.
Bookmarking for later: if we begin to add more categories of users in this way, I suggest we refactor out to a single record in a dedicated table, say global_entities
, that has a column for each unique user/other entity.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- Tests
-
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