• Since moving my website to a VPS we’ve gotten some problems with the database crashing during times of high traffic (more specifically, wp_options crashes). Also during these intensive traffic-spikes we get “Could not connect to database”-errors.

    We run about 20 plugins, and according to P3 Performance Profiler we have on average 67 database queries per visit. This works fine and fast during normal traffic, but our spikes seem to be causing problems with the database. Our VPS-provider seems confident that it is our wordpress-setup and the many mysql queries that cause this.

    Som my question is twofold I suppose:
    1. Would reducing the number of queries improve site stability and reduce the risk of our database crashing?

    2. For someone like me who is no programmer, how would I best go about trying to reduce the number of mysql queries? Are there good plugins for this? Or other methods?

    Any input more than welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • 1. yes, less queries is always better. A good host should certainly be able to handle 67 queries! I run sites that generate much more than that.

    2. Without programming skills you are out of luck. I’d hire a developer. Even with programming skills, if these requests are coming from multiple plugins, they will have a hard time combining them. Its not exactly an easy thing to try and do. ??

    Adding more plugins is not the answer… Reducing them might be.
    Try turning some things off.

    I suggest a dedicated server, if you really have the traffic to demand it, a dedicated server from an excellent hosting company will do the trick. I recommend SSD hard drives, nothing compares with the speed boost you will get.

    Hello Skrollen,
    These queries may be generated due to your plugins. Are all of them neccesary?
    Do you use any caching system? It would help you much.

    Thread Starter Skrollen

    (@skrollen)

    1. yes, less queries is always better. A good host should certainly be able to handle 67 queries! I run sites that generate much more than that.

    2. Without programming skills you are out of luck. I’d hire a developer. Even with programming skills, if these requests are coming from multiple plugins, they will have a hard time combining them. Its not exactly an easy thing to try and do. ??

    Adding more plugins is not the answer… Reducing them might be.
    Try turning some things off.

    I suggest a dedicated server, if you really have the traffic to demand it, a dedicated server from an excellent hosting company will do the trick. I recommend SSD hard drives, nothing compares with the speed boost you will get.

    Thanks for the tip regarding dedicated server. We will probably have to go that way pretty soon.

    Hiring a developer would be nice, just don’t have those funds yet ?? So right now looking for DIY solutions that can improve our stability and speed. Looking through our plugins and seeing what we can do without is definetely one of thos things. Thanks for your input!

    Thread Starter Skrollen

    (@skrollen)

    Hello Skrollen,
    These queries may be generated due to your plugins. Are all of them neccesary?
    Do you use any caching system? It would help you much.

    We use WP Fastest Cache and it seems to do the job, back when we installed it it certainly made the site faster. We haven’t gone into the cache options much though, perhaps it or another cache plugin could help improving the speed of mysql queies?

    Thanks for your input!

    Yes, it is highly recommended WP Super Cache.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Reduce mysql queries to improve site speed?’ is closed to new replies.