Lack of an Index on wp_posts.guid Slowing Down Queries
|Reported by:||waldojaquith||Owned by:||anonymous|
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.