[wp-trac] Re: [WordPress Trac] #9167: query_posts('meta_key=foo') returns duplicate posts

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 19 17:28:56 GMT 2009


#9167: query_posts('meta_key=foo') returns duplicate posts
--------------------------+-------------------------------------------------
 Reporter:  scribu        |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.7.2    
Component:  General       |     Version:           
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by mrmist):

 Replying to [comment:15 scribu]:

 > Ideally, you should exclude the meta_value column from the SELECT
 statement, but I'm not sure if it can be done.

 That was sort of my point.  If meta_value is being fetched for no reason
 and discarded the query cost is going up.  Best never to fetch it in the
 first place and not need the group_by.

 Of course if the query can't be broken up that way then I guess it would
 have to do.

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


More information about the wp-trac mailing list