Opened 23 months ago
Last modified 23 months ago
#18315 new enhancement
Add an index to the GUID column in the posts table
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Database | Version: | 3.2.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | nacin |
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 (5)
alexkingorg
— 23 months ago
comment:1
alexkingorg
— 23 months ago
- Keywords has-patch added
comment:2
alexkingorg
— 23 months ago
Ticket #18286 has been updated with a patch that also includes the change suggested here.
comment:4
alexkingorg
— 23 months 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().
Add an index to guid column during upgrade