Geo: Optimize verification queries

The following discussion from !58800 (merged) should be addressed:

Seems like we do the same kinds of queries so if we want to make optimization, then we should do that "globally".

We can look at the queries in a separate thread so this MR is not blocked. A few things to consider:

  • OR queries will not going to perform well for large volume of data. UNION can help here: https://docs.gitlab.com/ee/development/sql.html#use-unions
  • Are we paginating these queries? We might face problems with the OR queries.
  • When ideally conditionals and columns on the ORDER BY clause should be covered by an index.