WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 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:

Description

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 4 years ago.

Download all attachments as: .zip

Change History (6)

Denis-de-Bernardy4 years ago

comment:2 nacin4 years ago

  • Keywords multisite added

comment:3 Denis-de-Bernardy4 years ago

  • Keywords multisite removed

this one is WP. :-)

comment:4 Denis-de-Bernardy4 years ago

  • Keywords commit added

comment:5 dd324 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.