Reputation: 9567
I am running a query in mySQL Workbench. It takes 5 minutes from the start of the query to the display of the results. Nevertheless, the following "processing" times are shown (in WorkBench output panel):
Question : how can this difference be explained : 5 min vs 2.562 sec ?
BTW : this question is not a duplicate of people asking what the difference between duration and fetch is...
Upvotes: 4
Views: 5252
Reputation: 3258
I guess the problem is with Duration, the query execution time. I suspect the stats are not taking into account disk access and you might be missing some index. The other reason is that there can be waiting times for locking, which is supposed to be accounted for.
You can do the following to have more details on where your query spends time.
set profiling=1;
<run your query>
show profiles;
show profile for query 1;
Upvotes: 1