Analyze a MySQL table before swapping it in place.
Switch branches/tags
Nothing to show
Latest commit 3cbf206 Nov 29, 2014 @samlambert samlambert Merge pull request #1 from samlambert/automatically
Failed to load latest commit information.
.gitignore Initial commit Feb 19, 2014
LICENSE Initial commit Feb 19, 2014 automatically Nov 29, 2014 Analyze before the table swap Jun 14, 2014


Analyze a MySQL table before swapping it in place at the end of a migration.

In certain cases it is recommended not to allow MySQL to recalculate table statistics automatically as it can cause a drift in query plans. More info here and here.

This can cause a problems when using pt-online-schema-change as the statistics might not be correct on the new table. This plugin analyzes the table right before the swap is done which allows MySQL to recalculate the statistics and avoids slow queries.

To use the plugin just add:

--plugin /path/to/plugin/

to your pt-online-schema-change command.