My Oracle Support Banner

Why Does The Same Query Sometimes Get Different Explain Plans / Suddenly Take Longer to Execute (Doc ID 1499963.1)

Last updated on FEBRUARY 27, 2020

Applies to:

MySQL Server - Version 5.5 and later
Information in this document applies to any platform.

Symptoms

An expected clone ( ie an identical restore or a replication slave ) of an arbitrary DB should have identical data and schema and even hardware, however an SQL statement, executed on the 2nd host can take much longer than the original.

If resourcing for the servers are identical and their configs also, then all that is left is to check the EXECUTION PLAN for the SQL .

This will likely show differences, either in the order of the tables or different indexes completely.

This difference can persist even after running ANALYZE TABLE to update InnoDB statistics for the tables.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
 Cause 1
 Cause 2.
Solution
 Solution 1.
 Solution 2.
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.