[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 01:59:41 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:           

Comment(by filosofo):

 Replying to [comment:2 scribu]:
 > Can't this be solved by simply using "SELECT DISTINCT(wp_posts.ID)..."
 on all queries?

 No, that won't help for queries like this, because each ''row'' is already
 distinct.  Besides, DISTINCT clauses usually have a performance penalty,
 and this is the core query of WP.

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

More information about the wp-trac mailing list