WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#42204 closed enhancement (duplicate)

_options table missing an index on autoload column

Reported by: DionDesigns Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords:
Focuses: Cc:
PR Number:

Description

wp-includes/options.php has the following line:

if ( !$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) )

However, the "autoload" column is not indexed. This can lead to significant performance degradation if the _options table is large.

Change History (1)

#1 @ocean90
2 years ago

  • Component changed from General to Options, Meta APIs
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Type changed from defect (bug) to enhancement
  • Version 4.8.2 deleted

Hello @DionDesigns, welcome to WordPress Trac!

Thanks for your report, we are already tracking this request in #24044.

Note: See TracTickets for help on using tickets.