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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *