Skip to content

Revisit indexes for DB performance #132

@patrick-leb

Description

@patrick-leb

As discussed with @tillkruss :

I was having some slow queries – specifically one query that was already described 6 years ago here:
https://core.trac.wordpress.org/ticket/33885

The last comment by OllieJones https://core.trac.wordpress.org/ticket/33885#comment:86 pointed at hints on how it could be indexed better and he created a plugin that updates the indexes accordingly:

https://wordpress.org/plugins/index-wp-mysql-for-speed/

TL;DR of what the plugin does here:
https://www.plumislandmedia.net/index-wp-mysql-for-speed/tables_and_keys/

Applying those indexes has, in some queries, saved me 80%+ in DB time. This seems more apparent on larger sites with a ton of meta data (e.g. woocommerce)

He mentioned to me he plans on doing a PR to core eventually.

I'd like to tag him here in but i don't have his github handle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DiscussionAnything that needs a discussion/agreement[Type] FeatureA new feature within an existing module

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions