Not the answer you need?
Register and ask your own question!

Forcing pt-online-schema-change to use a different primary key PRIMARY KEY

ravimalghan@yahoo.com[email protected] EntrantCurrent User Role Poster
Hi: I have a table that has a primary key which is a string, that I am trying to run pt-online-schema-change. The table also has another integer, a key auto increment field. So the insert into temporary table takes a long time since it's doing a 
INSERT LOW_PRIORITY IGNORE INTO `historic_moogdb`.`_alerts_new.....FROM `historic_moogdb`.`alerts` FORCE INDEX(`PRIMARY`) WHERE ((`signature` >= 'xxxxxxxxxx')) AND ((`signature` <= 'xxxxxxxxxx')) LOCK IN SHARE MODE /*pt-online-schema-change 11650 copy nibble*/
Is there any way to tell pt-online-schema-change to use alert_id as the primary key?

CREATE TABLE `alerts` (  `signature` varbinary(767) NOT NULL DEFAULT '',  `alert_id` bigint(20) NOT NULL AUTO_INCREMENT, .

Answers

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.