The Facts:
- I am working on a NoteBook with Intel Core 2 Duo 2,26 GHz and 4 Gigabyte of Ram.
It has a Apache Server and a MySQL Server running. - My Server (I did
lshw | less) shows a 64 Bit CPU with 2,65 GHz and 4 Gigabyte Ram, too. It has the XAMPP-Package running on it. - The Database structures (tables, indices, …) are identical and so is the Python script I am running.
The Problem:
While the script runs in approximately 30 seconds on my macbook it took the script 11 minutes on the server!
What are the points you would check first for a bottleneck?
The Solution:
There were two indices missing on one of the machines. I added them and voilá: Everything was super! The `EXPLAIN’ keyword of MySQL was worth a mint. =)
What kind of server? If you’re renting a VPS or similar you’re contending with other users for CPU time.
What platform is running on both? Tell us more about your situation!