Skip to content

Posts tagged ‘EXPLAIN’

23
Jan

MySQL – optimize your query to be more scalable (Part 2/2)

databaseExperiment 3

The next experiment is to discover whether using the combination index can speed up the query. The following indices are created:

CREATE INDEX Id on T1 (Id);
CREATE INDEX Time_Id on T2 (Time, Id); Read more »

23
Jan

MySQL – optimize your query to be more scalable (Part 1/2)

databaseIntroduction

When we design and develop a database application, sometimes scalability is not considered or not a priority. When the size of data grows significantly, we often increase the hardware as the defacto solution. By understanding your MySQL queries, there may be easy steps to free up some processing power. In this article, I am going to discuss step by step, how to improve the performance of a simple MySQL query with a semi-large data set. The example shows a speedup from over 8 mins to just less than 30 secs.

Read more »