轉自:https://segmentfault.com/a/1190000009915519segmentfault
config set slowlog-log-slower-than 100 (單位ms)日誌
config set slowlog-max-len 1024 日誌最多存個數blog
config rewriteget
slowlog get n it
(2) 獲取慢查詢日誌列表當前長度配置
slowlog lenim
例如,當前Redis中有45條慢查詢:配置文件
127.0.0.1:6370> slowlog len查詢
(integer) 23rewrite
slowlog reset