Answering this question is not easy. Like always, the best response is “it depends” !
But let’s try to give you all the necessary info the provide the most accurate answer. Also, may be fixing one single query is not enough and looking for that specific statement will lead in finding multiple problematic statements.
The most consuming one
The first candidate to be fixed is the query that consumes most
of the execution time (latency). To identify it, we will use the
sys schema and join it with
performance_schemato retrieve a real example of the
query (see this post for more details).
Let’s take a look at what
sys schema has to offer us
related to our mission:
> show tables like …