June 18, 2013

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

mysql> SHOW CREATE TABLE test\G *************************** 1. row *************************** Table: test Create Table: CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `col2` int(11) DEFAULT NULL, `col3` varchar(200) DEFAULT NULL

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

NULL Check_time: NULL Collation: latin1_swedish_ci Checksum: NULL Create_options: Comment: 1 row in settables and need to run ALTER TABLE which rebuilds the table or OPTIMIZE TABLE do not forget to

Post: Hacking to make ALTER TABLE online for certain changes

…, you’d usually ALTER TABLE `huge_table` CHANGE `id` `id` int(6) NOT NULL and then wait hours for table rebuild to complete. If you’…Table: CREATE TABLE `huge_table` ( `id` int(6) NOT NULL, `text` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) mysql

Post: Converting Character Sets

…: mysql> CREATE TABLE `t1` ( ->   `c1` text NOT NULL -> ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Query OK, 0 rows affected (0.02 sec) mysql> ALTER TABLE `t1` CONVERT TO CHARACTER SET

Post: Should you name indexes while doing ALTER TABLE ?

MySQL Server does not require you to specify name of the index if you’re running ALTER TABLE statement – it is optional. Though what might…(11) default NULL, `j` int(11) default NULL, KEY `i` (`i`,`j`), KEY `i_2` (`i`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 1 row in set (0…

Post: Ultimate MySQL variable and status reference list

to the amazing MySQL manual, especially the option and variable reference table. But just as frequently, I want to

Post: A recovery trivia or how to recover from a lost ibdata1 file

tables mysql> show create table test.tablesG *************************** 1. row *************************** Table: tables Create Table: CREATE TABLE `tables` ( `name` varchar(100) DEFAULT NULL, `spaceid` int(11) NOT NULL, PRIMARY KEY (`spaceid`) ) ENGINE=MyISAM DEFAULT

Post: Improved InnoDB fast index creation

default method is used: mysql> SET profiling=1; Query OK, 0 rows affected (0.00 sec) mysql> ALTER TABLEnot applicable: UNIQUE indexes in ALTER TABLE are ignored to enforce uniqueness where necessary when copying the data to a temporary table; ALTER TABLE and OPTIMIZE TABLE always process tables

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

TABLE `dir_test_innodb` ( `id` int(10) unsigned NOT NULL, `full_name` varchar(100) DEFAULT NULLALTER TABLE statement, but it’s not possible to CREATE more than one at a time. If you try it, this is what happens: mysql> alter table