Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options table uses optimisation #4389

Closed
bactisme opened this issue Apr 15, 2016 · 13 comments
Closed

Options table uses optimisation #4389

bactisme opened this issue Apr 15, 2016 · 13 comments

Comments

@bactisme
Copy link

bactisme commented Apr 15, 2016

At the beginning of each request, wordpress loads all wp_options lines that have autoload set to "yes".

What is the problem:

On my websites, it load ~550 lines : ~500 are wpseo_sitemap_XXX_cache_validator like options.

Do we really need all this lines, preloaded on every request ? We could all spare some milliseconds and database usage here.

Technical info

  • WordPress version: 4.4.2
  • Yoast SEO version: 3.1.2
@Rarst
Copy link
Contributor

Rarst commented Apr 15, 2016

Agreed. I think this slipped past since validator entries are actually options, not transients.

@Rarst Rarst self-assigned this Apr 15, 2016
@bactisme bactisme changed the title Transients Optimisation Options table uses optimisation Apr 15, 2016
@trepmal
Copy link

trepmal commented May 5, 2016

I'm working with a site on the same WP and plugin versions (4.4.2, 3.1.2 respectively) that has more than 1800 cache_validator options. And I know of another site (unknown versions) with over 7700 cache_validator options.

Will an update from v3.1.2 to v3.2.4/current resolve this?

I'm working on testing this locally, but circumstances make it a bit of an undertaking, and am hoping for a quick definitive answer :)

@Rarst
Copy link
Contributor

Rarst commented May 5, 2016

It's not fixed yet, but I am getting to it soon(ish)... I am down to like 30 unpatched sitemaps issues (hey, it was a looot more).

@Rarst
Copy link
Contributor

Rarst commented May 6, 2016

Opened PR to kill autoload.

Though I am pretty puzzled why would this be in the hundreds. Validator is saved once per type.

I doubt that site got 7700 custom post types or something? What does keys for it look like?

@bactisme
Copy link
Author

bactisme commented May 6, 2016

Hello @Rarst

Some more info (www.frandroid.com, 30k published posts, 15M PVs/M):

capture ecran 2016-05-06 a 16 46 18

capture ecran 2016-05-06 a 16 47 11

@Rarst
Copy link
Contributor

Rarst commented May 6, 2016

Thank you, now I see few numeric entries in my dev install, but I don't understand what they even stand for. Will look into it.

@Rarst
Copy link
Contributor

Rarst commented May 9, 2016

I've asked around and the issue with creating multiple entries should have been fixed as part of ongoing work and should not happen anymore in current stable.

Please let us know if you observe the count still growing.

@archon810
Copy link

I updated but still see a lot of these cache validator entries. Are they safe to remove/clean up?

@Rarst
Copy link
Contributor

Rarst commented Jul 14, 2016

@archon810 yes, they are safe to remove :)

@bactisme
Copy link
Author

DELETE FROM wp_options WHERE option_name LIKE 'wpseo_sitemap%'

@DavidAnderson684
Copy link

I think that the plugin ought to have code to automatically remove these, if they are no longer needed. I have apparently had over 10,000 of these slowing my site down for over a year since they became unnecessary.

@JohnBijl
Copy link

overhere the same problem evertime a overload

@mwendell
Copy link

Please move this data out of the wp_options table!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants