Issue search is sometimes slow when no issues will be matched
Issue search queries such as https://gitlab.com/api/v4/projects/gitlab-org%2Frelease%2Ftasks/issues?labels=Monthly%20Release,security&milestone=13.0&search=Security%20patch%20release:%2013.0.6,%2012.10.11,%2012.9.10 sometimes take a long time (hitting gitlab.com's 15s DB statement timeout).
We observed queries such as this taking >15s when no issues would have been returned. Creating an issue under one of the relevant milestones sped up these queries, returning a single issue in less than 1s.
We don't have the query plan that was used at query time, but we collected a plan (and executed the query) after an issue had already been created:
Queries and plans can be found in https://gitlab.com/gitlab-com/gl-infra/production/-/issues/2257, which is confidential for now, so I haven't pasted the plans here.