Hmmmm. I actually think this would be somewhat difficult to write, Robert. Parsing the queries would be complex enough given the different ways one can construct SQL. Also it would have to examine the cardinality of the data in each column to determine if indexing would be worthwhile vs. a table scan... and then there's the human judgment that needs to be made as far as which queries actually need optimizing vs those that don't, or that need an index less at any rate. The ones that get run several times a second vs once an hour or once a day ...
My two cents' worth anyway. Dan On 11/3/06, Robert DiFalco <[EMAIL PROTECTED]> wrote:
I'm looking for a tool that could parse a boat load of various queries using complex joins and subqueries, analyze each, and print out the optimal covering indices that could be used on each table for each query. It would have to take into consideration stuff like a WHERE expression that could not use an index even if the column was indexable. I suppose it would not be difficult to build one but I was hoping that someone knew of a tool out there that already did such a thing? The problem with EXPLAIN is that it will print out how the query will be executed based on existing indices, not the optimal indices that may or may not exist yet. TIA, R. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]