Identical servers different plan for the same query
Posted by:
Eric Coll
Date: April 07, 2012 01:20AM
I have two identical servers running the same query but the query plans are completely different. How is this possible?
The servers are a master and a slave. The schema is identical compared by MySQL Workbench. The data is identical as it is replicated, and the server variables are identical as well.
The query is very simple:
select * from capacity.pool_usage pu
join capacity.last_timestamp lt
on pu.region = lt.region and
pu.timestamp = lt.timestamp and
lt.datatype = 'USAGE'
where
account in ('866211823536')
The master correctly grabs the timestamp record for each region in the lt table, and filters the usage table using a timestamp, regio index which is very efficient.
The slave queries all the usage for the selected account, and then joins with the lt table.
How is this possible? Shouldn't both servers use the same query plan?
Subject
Views
Written By
Posted
Identical servers different plan for the same query
3172
April 07, 2012 01:20AM
1411
April 07, 2012 09:55AM
1423
April 07, 2012 02:54PM
1673
April 08, 2012 12:20PM
1855
April 09, 2012 10:24AM
1444
April 09, 2012 10:35AM
1371
April 09, 2012 10:37AM
1437
April 09, 2012 10:42AM
1443
April 10, 2012 03:28PM
1479
April 10, 2012 10:29PM
1356
April 11, 2012 10:05AM
1454
April 12, 2012 08:56AM
1431
April 12, 2012 03:23PM
2543
April 13, 2012 03:49PM
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.