Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 11075)
+++ wp-includes/wp-db.php	(working copy)
@@ -714,6 +714,12 @@
 
 			// Return number of rows selected
 			$return_val = $this->num_rows;
+			
+			// log explain
+			if ( defined('QUERIES_DEBUG') && defined('SAVEQUERIES') && QUERIES_DEBUG && SAVEQUERIES && 'SELECT FOUND_ROWS()' != $query ) {
+				$explain = @mysql_query("EXPLAIN $query", $this->dbh);
+				$this->queries[] = @mysql_fetch_object($explain);
+			}
 		}
 
 		return $return_val;
