Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#11741 closed defect (bug) (fixed)

Over-optimization in meta_form()

Reported by: Denis-de-Bernardy Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Optimization Keywords: has-patch commit
Focuses: Cc:


The meta_form() function is the only one in WP that does a query that uses LOWER().

I believe we introduced an over-optimization in the changeset that added the LOWER() statement. We could strip it, since we're using a natcasesort() immediately after. This would additionally allow to use the index on the meta_key column.

Attachments (1)

11741.diff (415 bytes) - added by Denis-de-Bernardy 5 years ago.

Download all attachments as: .zip

Change History (6)

@Denis-de-Bernardy5 years ago

comment:2 @nacin5 years ago

  • Keywords multisite added

comment:3 @Denis-de-Bernardy5 years ago

  • Keywords multisite removed

this one is WP. :-)

comment:4 @Denis-de-Bernardy5 years ago

  • Keywords commit added

comment:5 @dd325 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13503]) remove LOWER() in Order by clause for Post Meta. Allows MySQL to use the indexes properly. Props Denis-de-Bernardy. Fixes #11741

Note: See TracTickets for help on using tickets.