Check if your particular database and databse driver support prepare_cached(). On complex statements, this can speed up the compile/optimization process and will lighten the CPU load on the database server quite a lot. You will need to read your database documentation on which queries get cached and which don't, but it can be very rewarding in terms of not having to buy a bigger, more expensive server.