[MySQL] Slow Query Log 設定 (寫進mysql table)

Intro

快速設定MySQL Slow Query Log參數。


參數設定方法

可在my.cnf或是全域參數設定或修改:

// 開啟Slow Query Log 預設off
slow_query_log => on

// Long query 時間門檻,預設10
long_query_time => 10

// 載體,預設FILE改寫進Table
global log_output => TABLE

Leave a Reply

Your email address will not be published. Required fields are marked *