[wp-trac] [WordPress Trac] #52559: When doing JOINs for meta queries the meta_key should be in the ON clause whenever possible.
WordPress Trac
noreply at wordpress.org
Tue Jun 10 15:46:36 UTC 2025
#52559: When doing JOINs for meta queries the meta_key should be in the ON clause
whenever possible.
------------------------------------------+-----------------------------
Reporter: herregroen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-patch | Focuses: performance
------------------------------------------+-----------------------------
Changes (by flixos90):
* keywords: needs-unit-tests => needs-unit-tests needs-patch
* milestone: Awaiting Review => Future Release
Comment:
It makes a lot of sense to me that this query would be much faster by
making the `JOIN`s smaller. So I think this is a great idea.
It might be rather complex to implement, but if someone is up for working
on a pull request, I think this is something we could eventually land in
Core, and it could be very impactful for query performance.
I'm milestoning this for a future release for now.
cc @spacedmonkey for visibility
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52559#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list