[wp-trac] [WordPress Trac] #16706: Queries using "category__and" are slow on large databases

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 1 01:48:00 UTC 2011


#16706: Queries using "category__and" are slow on large databases
--------------------------+------------------------------
 Reporter:  tigertech     |       Owner:  scribu
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  close         |
--------------------------+------------------------------

Comment (by scribu):

 Here's an experiment to try on a clean install:

 Make two categories A and B.

 Make Post 1 and assign it both category A and category B.

 Make Post 2 and assign it to just category A.

 Do the `category__and => (A, B)` query and compare.

 The query without GROUP By will return Post 1 as well as Post 2, which is
 incorrect.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16706#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list