From: Domas Mituzas Date: Fri, 22 Jul 2005 14:05:58 +0000 (+0000) Subject: Commit live hacks: X-Git-Tag: 1.5.0beta4~65 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=bb7fae687c43d5910ba715fa559946a325b4a342;p=lhc%2Fweb%2Fwiklou.git Commit live hacks: * 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 --- diff --git a/includes/Database.php b/includes/Database.php index 69a3072dec..cb4632b1ab 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -300,7 +300,7 @@ class Database { 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 ); } @@ -1120,7 +1120,7 @@ class Database { * PostgreSQL doesn't have them and returns "" */ function useIndexClause( $index ) { - return "USE INDEX ($index)"; + return "FORCE INDEX ($index)"; } /**