Get the App
SLTechnology News&Howtos  ›  Database  › 

Pt-duplicate-key-checker and pt-diskstats and pt-deadlock-

Shulou Source: shulou.com Published: 2022-06-01 14:39:57 10月03日 Update

Find duplicate indexes and foreign keys and generate statements to delete duplicate indexes

Pt-duplicate-key-checker-user=root-password=energy@db-port=3307

Interactive check system io tool

Pt-diskstats-interval 5-iterations 10

Run for 4 hours with an interval of 30s each time, and run in the background

Pt-deadlock-logger upright rootforpenergytraindb-daemonize-run-time=4-interval=30s

Pt-table-checksum detects mysql master-slave consistency

Pt-table-checksum-user=user--password=password-host=host1--port=port-databases=db_name-tables=tablename-recursion-method=processlist

Pt-table-sync repairs slave data

Pt-table-sync-- execute-- replicate percona.checksums-- sync-to-master hobbies host2, Prun3306, Upright userpagePlease password

Pt-find Lookup Table

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

Tags: Index run consistent consistent Master-Slave Interactive background hour tool data system statement check Test generate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Microsoft MariaDB Docker Shulou Tech Info