* add function name to profiling name of sql queries
* change USE INDEX to FORCE INDEX, we use that where we really need to, so it won't hurt
if ( $wgProfiling ) {
# generalizeSQL will probably cut down the query to reasonable
# logging size most of the time. The substr is really just a sanity check.
- $profName = 'query: ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
+ $profName = 'query: ' . $fname . ' ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
wfProfileIn( 'Database::query' );
wfProfileIn( $profName );
}
* PostgreSQL doesn't have them and returns ""
*/
function useIndexClause( $index ) {
- return "USE INDEX ($index)";
+ return "FORCE INDEX ($index)";
}
/**