I've switched web hosting recently. The new box is slower than the old one (it's VPS vs. dedicated). However, performance testing reports that a good portion of the slowdown is database-driven.
I have a reference operation. On the old host it runs for 2.2 sec on average, 0.2 sec database access time. On the new one, 18 sec on average, 14 sec database time.
Server is the same - it's local MySQL v. 5.0.91-community in both cases. Connecting over Unix sockets.
What could account for such discrepancy? What server settings should I look at?