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
MySQL Server - Version 5.5 and later Information in this document applies to any platform.
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.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!