The MU forums have moved to WordPress.org

Unindexed query (1 post)

  1. SteveAtty
    Member
    Posted 12 years ago #

    I've got the log queries that dont use indexes set in my MySQL config file and it keeps logging one which I've tracked down to functions.php

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

    (its in the get_alloptions function).

    Well autoload doesn't actually have an index on it.

    Now you could argue that there aren't enough rows for it to matter but I'm interested in what anyone else thinks.

About this Topic

  • Started 12 years ago by SteveAtty