Opened 13 years ago
Last modified 5 years ago
#18315 reopened enhancement
Add an index to the GUID column in the posts table
Reported by: | alexkingorg | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2.1 |
Component: | Database | Keywords: | has-patch dev-feedback early needs-refresh |
Focuses: | Cc: |
Description
Running queries on the GUID column in the posts table is slow because the column is not indexed. The attached patch adds an index.
Note, this affects ticket #18286 - I will update that ticket with appropriate patches to reflect this request.
Attachments (1)
Change History (16)
#2
@
13 years ago
Ticket #18286 has been updated with a patch that also includes the change suggested here.
#4
@
13 years ago
Let's chat about this at WCSF. The index costs very little, and I think the use case of using GUIDs to identify posts/pages to be sync'ed between WordPress instances is valid. GUID is perfect for this usage because the value never changes, it is not tied to the site URL, and it can be set as part of wp_insert_post().
#5
@
11 years ago
- Keywords close added; has-patch removed
- Resolution set to wontfix
- Status changed from new to closed
Suggesting close based on Nacin's comments above.
#6
@
11 years ago
- Keywords dev-feedback added; close removed
- Resolution wontfix deleted
- Status changed from closed to reopened
I'd actually like to hear more reasoning on this before we close it.
I've often wanted to use the guid column as a way to verify uniqueness of content rather than just a placeholder for something that gets put into RSS feeds. Relying on a guid would be much nicer than doing meta queries for some of the stuff I've done in the past.
Add an index to guid column during upgrade