[wp-trac] [WordPress Trac] #33885: meta_form performs a potentially expensive query

WordPress Trac noreply at wordpress.org
Thu May 5 10:48:30 UTC 2016

#33885: meta_form performs a potentially expensive query
 Reporter:  jorbin                   |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Administration           |     Version:  4.3.1
 Severity:  critical                 |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance

Comment (by robscott):

 Replying to [comment:32 patzo]:
 > Replying to [comment:31 ocean90]:
 > > #36762 was marked as a duplicate.
 > has anyone able to resolve this issue? i believe my ticket was a
 > just really confusing when i read this page.
 There are a number of factors at play, almost all related to sites with a
 lot stored in wp_postmeta.

 Performance improvements can be found by implementing some of the
 solutions posted above, namely this one:


 The SQL query which will get this done for you may be similar to this one:


 If you're not using MU, and you have standard prefix, it will be very
 similar to the following:

 ALTER TABLE wp_postmeta MODIFY meta_key varchar(191);

 Highly recommend you do this in a test environment, and backup DB before
 running any alter table stuff. At the very least backup wp_postmeta.

 Then see if the slow queries are resolved. There are a few other things we
 needed to look at on the sites which had slow queries. Mainly very large
 installs with a lot of things in meta.

Ticket URL: <https://core.trac.wordpress.org/ticket/33885#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list