Opened 18 years ago
Closed 18 years ago
#7876 closed defect (bug) (fixed)
post_parent needs an index
| Reported by: | Otto42 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.7 |
| Component: | Optimization | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
+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.