I've cloned our development Cloud MySQL instance and the queries that I run on it from a Cloud Shell are consistently slower than the original. We asked GCP support through our hosting partner and they gave these reasons below however because the cloned instances have been online for over 24 hours now I would expect any indexing building work to have been completed. Is that assumption correct?
Also, we are experiencing the opposite of point 3 where the original runs slower.
Does anyone have any idea what might be causing this?
Resource contention: Cloning involves copying the entire database from the original instance. This process utilizes CPU, memory, and network bandwidth on both the source and destination instances.
Incomplete clone: While the data is copied, the clone might not be immediately ready for full performance. Depending on the cloning method used, indexes or other optimizations might need to be rebuilt on the new instance. This can take some additional time after the initial data copy.
Storage fragmentation: A newly created instance often has less fragmented storage compared to the original that has been running for a while. Fragmentation can impact read/write speeds. Over time, the cloned instance's performance might improve as the storage becomes more optimized.
Background processes: Cloning might trigger background processes on the new instance, like rebuilding indexes or optimizing tables. These processes can consume resources and temporarily impact performance.