Jump to content


Photo

4.7-3 Slow Query Log Analyzer - Slow From Table?


  • Please log in to reply
1 reply to this topic

#1 Van Jr

Van Jr

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 October 2011 - 02:31 PM

Version 4.7-3

Why does it take so long for the slow query analyzer to analyze from a TABLE vs a FILE?

#2 Van Jr

Van Jr

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 October 2011 - 03:02 PM

I found why:

See: http://dev.mysql.com...stinations.html

By default, the log tables use the CSV storage engine that writes data in comma-separated values format. For users who have access to the .CSV files that contain log table data, the files are easy to import into other programs such as spreadsheets that can process CSV input.

The log tables can be altered to use the MyISAM storage engine. You cannot use ALTER TABLE to alter a log table that is in use. The log must be disabled first. No engines other than CSV or MyISAM are legal for the log tables.

To disable logging so that you can alter (or drop) a log table, you can use the following strategy. The example uses the general query log; the procedure for the slow query log is similar but uses the slow_log table and slow_query_log system variable.


There are NO indexes on the log tables. So, I altered mysql.slow_log to be MyISAM and created index START_TIME_IDX on START_TIME.
That helped some.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users