[wp-trac] [WordPress Trac] #49278: Improve meta query
WordPress Trac
noreply at wordpress.org
Fri Apr 23 03:13:56 UTC 2021
#49278: Improve meta query
--------------------------+------------------------------
Reporter: jillebehm | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 5.3.2
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses: performance
--------------------------+------------------------------
Comment (by markparnell):
I've independently come to the same conclusion here. Particularly on large
sites (i.e. millions of rows in the meta table), this makes a massive
difference to performance. I've run some quick tests and got similar
results to @jillebehm - with the additional clause in the `JOIN` the
returned data is the same, but the query runs several orders of magnitude
quicker.
Would love for someone with more SQL (and `WP_Meta_Query`) knowledge than
me to take a look, but from where I'm sitting this appears to be a simple
change that could drastically improve performance for a lot of sites.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49278#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list