Opened 16 years ago
Closed 16 years ago
#7876 closed defect (bug) (fixed)
post_parent needs an index
Reported by: | Otto42 | Owned by: | |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Optimization | Keywords: | |
Focuses: | Cc: |
Description
Lots of the new functionality related to attachments and galleries and such causes queries which use the post_parent field in the posts table. This field is not indexed, meaning that queries for the images in a gallery cause a lot of DB work to be done. Indexing this field would reduce this work quite a bit, and speed up the creation of gallery displays in posts.
Suggest we add a new index on post_parent to the schema.
Change History (2)
Note: See
TracTickets for help on using
tickets.
+1, I noticed that too. $post_parent stopped working with my multiple gallery support so I had to revert to $post_ID and $ID. Though I changed were I needed it, I still think this is a good idea.