Commit live hacks:
authorDomas Mituzas <midom@users.mediawiki.org>
Fri, 22 Jul 2005 14:05:58 +0000 (14:05 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Fri, 22 Jul 2005 14:05:58 +0000 (14:05 +0000)
* 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

includes/Database.php

index 69a3072..cb4632b 100644 (file)
@@ -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)";
        }
 
        /**