Geo: Optimize verification queries
The following discussion from !58800 (merged) should be addressed:
-
@aakriti.gupta started a discussion: (+8 comments)
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:
-
ORqueries will not going to perform well for large volume of data.UNIONcan help here: https://docs.gitlab.com/ee/development/sql.html#use-unions - Are we paginating these queries? We might face problems with the
ORqueries. - When ideally conditionals and columns on the
ORDER BYclause should be covered by an index.