[wp-trac] [WordPress Trac] #62931: Inconsistency When Querying and Sorting by meta_key with Multiple Values

WordPress Trac noreply at wordpress.org
Mon Feb 10 11:47:13 UTC 2025


#62931: Inconsistency When Querying and Sorting by meta_key with Multiple Values
--------------------------------------+------------------------------
 Reporter:  maximeschoeni             |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Query                     |     Version:  6.7.1
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback 2nd-opinion  |     Focuses:
--------------------------------------+------------------------------

Comment (by maximeschoeni):

 Replying to [comment:1 mayanktripathi32]:
 > MIN function might negatively affect performance of query here, MySQL
 needs to compare all values for each post to determine the minimum which
 can cause slow downs if too many rows are present.

 If performance is the issue, lets consider `ANY_VALUE()` instead of
 `MIN()`. That wouldn't resolve the problem of inconsistency but at least
 would stick better with MYSQL standards.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62931#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list