How do I do a CREATE INDEX
with Percona's pt-online-schema-change
tool? I want to do something like:
CREATE UNIQUE INDEX idx_name ON table_name (col_1, col_2, ...) USING BTREE
According to the documentation, I must use the --alter
argument and then the appropriate ALTER TABLE
statement, minus the preceding ALTER TABLE table_name
phrase. However, CREATE INDEX
does not start with ALTER TABLE
, and the table name is embedded inside the CREATE INDEX
statement. So how can I move forward?