pt-duplicate-key-checker及pt-diskstats及pt-deadlock-

查找重複的索引和外鍵並生成刪除重複索引的語句
pt-duplicate-key-checker --user=root --password=energy@db --port=3307
交互式的檢查系統io工具
pt-diskstats --interval 5 --iterations 10
運行4小時,每次間隔30s,後臺運行
pt-deadlock-logger u=root,p=energy@db --daemonize --run-time=4 --interval=30s

pt-table-checksum 檢測mysql主從一致性
pt-table-checksum --user=user--password=password --host=host1--port=port --databases=db_name --tables=tablename --recursion-method=processlist

pt-table-sync 修復從庫數據
pt-table-sync --execute --replicate percona.checksums --sync-to-master h=host2,P=3306,u=user,p=password
pt-find 查找表
pt-find --user=root --password=energy@db --tablesize +5G
pt-find --user=root --password=energy@db --printf "%T\t%D.%N\n" --tablesize +5G |sort -rn

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章