MySQL explain select stuck creating temporary table
Posted by:
Eric Coll
Date: April 11, 2012 01:25AM
Why an explain select shows in the process list as "Copying to tmp table"? Shouldn't the explain just create the query plan and don't execute the query? It also takes a very long time and seems blocked, although nothing else is running on the server.
Here is the query:
explain select date(from_unixtime(timestamp)) as day, account, internal_az, max(count) as max
from
( select timestamp, account, zone as internal_az, sum(s_total) as count
from capacity.reservation
where timestamp between unix_timestamp('2012-03-10') and unix_timestamp('2012-04-10') and account in ('833008473584')
group by timestamp, account, internal_az
) sum
group by day, account, internal_az;
Subject
Written By
Posted
MySQL explain select stuck creating temporary table
April 11, 2012 01:25AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.