Skip to main content

Percona Toolkit

  • Verify MySQL replication integrity by checking source and replica data consistency
  • Efficiently archive rows
  • Find duplicate indexes
  • Summarize MySQL and MongoDB servers
  • Analyze MySQL queries from logs and tcpdump
  • Analyze MongoDB query profiler
  • Collect vital system information when problems occur

brew install percona-toolkit

Read queries from a log and analyze how they use indexes.

pt-deadlock-loggerprints information about MySQL deadlocks by polling and parsingSHOWENGINEINNODBSTATUS. When a new deadlock occurs, it's printed toSTDOUTand, if specified, saved to --dest

pt-deadlock-logger -host sttash-main-db-instance-new-cluster.cluster-ro-c1z93jsyca9u.ap-south-1.rds.amazonaws.com --user lms-website --password Rf9zdHwB9E3GHWKq2yZM- [pt-diskstats](https://www.percona.com/doc/percona-toolkit/LATEST/pt-diskstats.html)

pt-duplicate-key-checker -host sttash-main-db-instance-new-cluster.cluster-ro-c1z93jsyca9u.ap-south-1.rds.amazonaws.com --user lms-website --password Rf9zdHwB9E3GHWKq2yZM

pt-mysql-summary --host localhost --user root --ask-pass > mysql-summary.txt

pt-mysql-summary --host sttash-main-db-instance-new-cluster.cluster-ro-c1z93jsyca9u.ap-south-1.rds.amazonaws.com --user lms-website --password Rf9zdHwB9E3GHWKq2yZM > mysql-summary.txt- [pt-online-schema-change](https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html)

pt-online-schema-change --host dailydb.snapshot.example.com --user deepak_sood --password 72062eacf89016e8c2bb4fe9c4457b90 --alter='ENGINE=InnoDB' D=sttash_website_LIVE, t=elev8_offer_tmp --preserve-triggers --dry-run

Works by creating an empty copy of the table to alter, modifying it as desired, and then copying rows from the original table into the new table. When the copy is complete, it moves away the original table and replaces it with the new one. By default, it also drops the original table.

https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html

https://www.percona.com/doc/percona-toolkit/3.0/pt-online-schema-change.html- pt-pmp

Percona pt-online-schema-change Performance | by Gauraang Khurana | Medium

https://www.percona.com/software/database-tools/percona-toolkit