pt-online-schema-change and disk space

gilbertasmgilbertasm EntrantCurrent User Role Participant
Hello,

if I want to add index to table with pt-online-schema-change, before running pt-online-schema-change I should check that there is at least
 SELECT table_name AS "Table",  round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"  FROM information_schema.TABLES  WHERE table_schema = "$DB_NAME"  AND table_name = "$TABLE_NAME";

space in my hard drisk (where $TABLE_NAME is name of the table I want to add index), right? Because AFAIK percona copies all data to temp table, do changes, and then rename temp table to old table. And probably I should account for space additional index will create, right?

Comments

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.