January 2019
Intermediate to advanced
286 pages
7h 41m
English
One query that is generally considered slow is a query that is accompanied with the GROUP BY option. We will show you how to optimize and reduce the response time for this kind of query.
Group by example
Let's look at this simple example: a question about the number of employees in each restaurant:

When we look at the output, we can see that there is no indexes are used by MySQL (no proper ones are available). We do, however, notice Using temporary; Using filesort. MySQL will unfortunately have to create a temporary table to satisfy the GROUP BY clause and also the fact that it has to support four ...
Read now
Unlock full access