[wp-trac] Re: [WordPress Trac] #7633: Lack of an Index on wp_posts.guid Slowing Down Queries

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 28 23:59:48 GMT 2008


#7633: Lack of an Index on wp_posts.guid Slowing Down Queries
--------------------------+-------------------------------------------------
 Reporter:  waldojaquith  |        Owner:  anonymous
     Type:  enhancement   |       Status:  new      
 Priority:  normal        |    Milestone:  2.7      
Component:  Optimization  |      Version:  2.6.1    
 Severity:  normal        |   Resolution:           
 Keywords:  guid, mysql   |  
--------------------------+-------------------------------------------------
Comment (by waldojaquith):

 Well, sure, but I don't think you'll find that they help much—they're
 quite simple, as I described them.

 {{{
 SELECT id, post_modified_gmt
 FROM wp_posts
 WHERE guid="http://www.example.com/blog/123/"
 }}}

 And:

 {{{
 UPDATE wp_posts
 SET post_author = "Jon Doe",
 post_content = "Best stovepipes ever! Let me tell you all about them...",
 post_title = "Acme Stovepipe Co.",
 post_modified = "2008-08-31 08:00:00"
 WHERE guid="http://www.example.com/blog/123/"
 }}}

 As you can see, there's only one viable index.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7633#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list