Read logfile from STDIN an try to EXPLAIN all SELECT statements. All UPDATE statements are rewritten to an EXPLAIN SELECT statement. The results of the EXPLAIN statement are collected and counted. All results with type=ALL are collected in an separete list. Results are printed to STDOUT.
Read logfile from STDIN an try to EXPLAIN all SELECT statements. All UPDATE statements are rewritten to an EXPLAIN SELECT statement. The results of the EXPLAIN statement are collected and counted. All results with type=ALL are collected in an separete list. Results are printed to STDOUT.
...
@@ -331,7 +334,7 @@ __END__
...
@@ -331,7 +334,7 @@ __END__
=head1 NAME
=head1 NAME
explain_log.pl
mysql_explain_log
Feed a mysqld general logfile (created with mysqld --log) back into mysql
Feed a mysqld general logfile (created with mysqld --log) back into mysql
and collect statistics about index usage with EXPLAIN.
and collect statistics about index usage with EXPLAIN.
...
@@ -348,7 +351,7 @@ Then add indices to avoid table scans and remove those which aren't used.
...
@@ -348,7 +351,7 @@ Then add indices to avoid table scans and remove those which aren't used.