…mysql> ALTER TABLE test ADD INDEX (col2); Query OK, 0 rows affected (0.22 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE…Column types: # `col2` int(11) default null # `col3` varchar(200) default null # To remove this duplicate index, execute: ALTER TABLE…
Post: pt-online-schema-change and default values
…online-schema-change: root@smt2:~# pt-online-schema-change –execute –alter=”add column v varchar(100) not null” D=sbtest,t=sbtest Altering `sbtest`.`sbtest`… Creating new table…
Post: Knowing what pt-online-schema-change will do
…alter statement: Altering new table… ALTER TABLE `test`.`_t_new` add column (foo char(2)) Altered `test`.`_t_new` OK. If the syntax of the –alter…
Post: Using MMM to ALTER huge tables
…table modifications online. It works well when all you want is to remove auto_increment or change ENUM values. When it comes to changes that really require table to be rebuilt – adding/dropping columns or indexes, changing data type, converting data to different character set – MySQL…
Post: Data compression in InnoDB for text and blob fields
…MySQL manual states: This setting may still be useful for tables with many long BLOB, VARCHAR or TEXT columns…change from Percona Toolkit 2.1 in order to modify the table if you cannot sustain the blocking effects of a traditional ALTER TABLE…
Post: Percona Toolkit 2.1.9 is ready
… 918056: pt-table-sync false-positive error “Cannot nibble table because MySQL chose …columns pt-online-schema-change 2.1.9 handles another case of changing the primary key. However, since changing the primary key is tricky, the tool stops if –alter…
Comment: pt-online-schema-change and default values
… the ALTER, because you haven’t specified what should go into column v. MySQL will let the ALTER proceed, and then during the copy-table-to-new-table process, assigns an empty string to column v… value for column v, it changes its mind and decides to be strict. This is what’s causing pt-online-schema-change to have…
Post: High-Performance Click Analysis with MySQL
…site analytics, search engine marketing, online advertising, user behavior analysis,… in those aggregate tables, and include columns to support these …change the lifecycle of your application in advance. What about partitioning in MySQL…from the downtime caused by ALTER TABLE — a typical reason to…
Post: Using Flexviews - part one, introduction to materialized views
… a talk on it at the MySQL 2011 CE, and I figured …a virtual table. It has columns and rows, just like a database table, but …twice as much space (similar to ALTER TABLE) Supports all SQL syntax (like outer…changes Finally, the last blog post will describe how to use Flexviews for online schema change…
Comment: Database problems in MySQL/PHP Applications
…column) in nearly (emphasize nearly) every InnoDB table…ALTER TABLE or OPTIMIZE TABLE > now locks small table for few seconds rather than giant 100GB table > for few hours so can be done pretty much online…

