[wp-trac] [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 19:50:47 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        |    Keywords:  guid, mysql
--------------------------+-------------------------------------------------
 I use both the !FeedWordPress plug-in, plus some code of my own devising,
 which rely on the GUID field in the wp_posts table. In the case of
 !FeedWordPress, the GUID is used to store the original URL of posts
 syndicated from third-party websites. On blogs with large numbers of posts
 (two of mine have over 150k) that rely on the GUID as a unique identifier
 for SQL queries, performance becomes enormously slow. That's because there
 is no index on GUID, despite its intended role as a unique identifier. The
 same problem manifests itself, regardless of FeedWordPress, with any large
 WordPress install with queries that are premised on posts' GUID.

 Suggested fix: Create an index on wp_posts.guid by default, as a part of
 core.

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


More information about the wp-trac mailing list