Opened 11 years ago
Closed 11 years ago
#32361 closed enhancement (duplicate)
/wp-admin/post.php is so slow because of wrong query
| Reported by: | wolfkang | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Posts, Post Types | Version: | 4.2.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | performance |
Description
I have 28,732 rows in the wp_posts table, and 1,631,109 rows in the wp_postmeta.
The post edit page is so slow and its loading time is over 7 seconds.
/wp-admin/includes/template.php shoud be modified like this.
Before modification in line 673
$sql = "SELECT meta_key
FROM $wpdb->postmeta
GROUP BY meta_key
HAVING meta_key NOT LIKE %s
ORDER BY meta_key
LIMIT %d";
After modification
$sql = "SELECT DISTINCT meta_key
FROM $wpdb->postmeta
WHERE meta_key NOT LIKE %s
ORDER BY meta_key
LIMIT %d";
The grouping is not necessary.
Please check it out.
Change History (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report wolfkang!
This is a duplicate of an existing issue: #24498.