MySQL query optimizing

A not so complex query was taking a huge time to complete (hours …).

I searched for an “EXPLAIN ANALYSE” a la PostgreSQL on MySQL … this does not exists.

BUT

They have a less featured command called “EXPLAIN EXTENDED”[1][2] that outputs some interesting information.

I found that adding two indexes helped me to have the query processed in some seconds … 😉

[1] The EXTENDED argument did not change the ouput I had …

[2] Using explain from mysql website

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: