Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#11741 closed defect (bug) (fixed)

Over-optimization in meta_form()

Reported by: denis-de-bernardy's profile 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 14 years ago.

Download all attachments as: .zip

Change History (6)

#2 @nacin
14 years ago

  • Keywords multisite added

#3 @Denis-de-Bernardy
14 years ago

  • Keywords multisite removed

this one is WP. :-)

#4 @Denis-de-Bernardy
14 years ago

  • Keywords commit added

#5 @dd32
14 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.