I'm having issues with Wordpress being too slow. I discovered it's because of MySQL queries. They take sometimes 2 - 10s - way too long.

I installed Query Monitor to see what's causing the problem: https://cdn.pbrd.co/images/GRit4ZF.png

  • Is this the only "slow" query? Also, check your Plugins. 2 seconds for the options is pretty slow. Commented Oct 30, 2017 at 10:56
  • 1
    @kuchenundkakao it is not the only slow query. There are others, but it happens only sometimes.
    – devondre
    Commented Oct 30, 2017 at 11:32
  • Well, if there are more slow queries, maybe a) the MySQL Server is really really slow, or if the MySQL Server is a different machine than the Webserver, maybe the Connection between MySQL Server and Webserver is really slow. Maybe there is a PHPMyAdmin on the MySQL-Server where you can check if the same query in it is as slow? Commented Oct 30, 2017 at 12:08
  • 1
    @kuchenundkakao the server is the same. It's running on VPS.
    – devondre
    Commented Oct 30, 2017 at 12:17
  • 1
    @kuchenundkakao it is slow only sometimes. I wasn't able to reproduce it in the PMA
    – devondre
    Commented Oct 30, 2017 at 12:20

1 Answer 1


WP options (which is one of the most basic and used storage APIs) can be stored with or without "autoload" setting. Usually this is reasonable, since many options will be checked on each and every page load, so loading them in bulk during core load is much more efficient than individually.

Problems usually start when two problems compound:

  1. the total amount of options gets significantly large (let's say hundreds of thousands, but it depends);
  2. large amount and/or size of options are marked for autoload which shouldn't be.

There is no generic solution to this issue, since there is no generic common cause.

You would need to examine your actual data to see which options get loaded and what exactly happens to be a bottleneck.

  • There are 433 rows in SQL. Is it too much?
    – devondre
    Commented Oct 30, 2017 at 11:28
  • 2
    Less than a thousand is definitely too few too matter. So it's probably about size of options or possibly something choking in MySQL server itself.
    – Rarst
    Commented Oct 30, 2017 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.