June 19, 2013

Post: The small improvements of MySQL 5.6: Duplicate Index Detection

…): mysql> ALTER TABLE test ADD INDEX (col2); Query OK, 0 rows affected (0.36 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE… null # `id` int(11) not null auto_increment # To shorten this duplicate clustered index, execute: ALTER TABLE `test`.`test` DROP INDEX `redundant`, ADD…

Post: Avoiding auto-increment holes on InnoDB with INSERT IGNORE

… InnoDB tables on MySQL version 5.1.22 or newer? If so, you probably have gaps in your auto-increment columns. A simple… IGNORE behaviour without losing auto increment values. Let’s start! Why do we have gaps? InnoDB checks an auto_increment counter on the table… customer. So, if this saves you from doing an ALTER TABLE to change the auto incremental column size, then send him a beer ;)

Post: AUTO_INCREMENT and MERGE TABLES

… too. Can you use AUTO_INCREMENT clause in CREATE TABLE to get different auto_increment values ? I guess not: mysql> alter table am auto_increment=1000; Query OK… stores auto_increment value (and of course does it without any warnings) Neither setting auto_increment value for underlying MyISAM tables works: mysql> alter table a1 auto_increment

Post: Ultimate MySQL variable and status reference list

auto_increment_incrementblogpercona.commanual auto_incrementalter_db_upgradeblogpercona.commanual Com_alter_eventblogpercona.commanual Com_alter_functionblogpercona.commanual Com_alter_procedureblogpercona.commanual Com_alter_serverblogpercona.commanual Com_alter_tableblogpercona.commanual Com_alter

Post: ALTER TABLE: Creating Index by Sort and Buffer Pool Size

… in terms of data and index size: mysql> show table status like “sbtest” \G *************************** 1. row …: 0 Index_length: 1460322304 Data_free: 7340032 Auto_increment: 10000001 Create_time: 2012-06-27 13:… the speed of ALTER TABLE, as this is not only step which ALTER TABLE does the …

Post: Hacking to make ALTER TABLE online for certain changes

… the InnoDB auto-inc scalability issue with MySQL 5.0 and older versions, employing other techniques to maintain the PK auto incremental becomes more… is to remove current PK auto_incremental from the table. As a rule of thumb, this usually involves altering huge InnoDB tables and…

Post: MySQL Users Conference - Innodb

… ? Will be UNIQUE indexes built by sorting in case of ALTER TABLE (the big Gotcha for MyISAM tables). Are there any… bunch of others due to statement level MySQL Replication which among other requirements, needs all auto-increment values in multiple value insert to… In MySQL 5.1+ it is also possible to fix this problem for cases when number of rows in auto-increment batch insert…

Post: Statement based replication with Stored Functions, Triggers and Events

… previous steps but in this case we alter every event adding DISABLE ON SLAVE. ALTER EVENT even_name DISABLE ON SLAVE. LOCAL…-22.1. AUTO INCREMENTAL VALUES In order to have the same auto incremental values on master and slaves the actual used auto incremental value is logged as an extra event just before the statement. MySQL

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

…, and then I create one, the following warning is generated: mysql> alter table dir_test_innodb ADD FULLTEXT KEY (full_name, details…’ll get an error: mysql> CREATE TABLE dir_test_innodb4 (fts_doc_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY); ERROR 1166… sort of sequence value for that column, whether as an auto_increment value or via some other means, but the bit that…