Update LabelFinder to use index more efficiently
In !61648 (comment 594987131), @dskim_gitlab made the observation that we should be able to use the index more efficiently when querying labels:
What do you think about specifying
project_id IS NULL
andgroup_id IS NULL
when queryinggroup_id
orproject_id
to utilize existing unique index? It seems thatgroup_id
andproject_id
are mutually exclusive as far as I can tell so it shouldn't change any underlying behavior, but I'm not sure if I missed anything.
See also !61648 (comment 596152850) and !61648 (comment 596162004) for additional observations.
A possible MR was started, but more DB expertise is needed.
Edited by Brett Walker