June 19, 2013

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

… that use MySQL, for which we at Percona tend to find redundant indexes. And second, because in some cases, we may need to have… includes mysqlindexcheck, similar to pt-duplicate-key-checker, but it does not detect all cases. For example: mysql> alter table test add index redundant (col2…

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

…())); and added key on column C: alter table sbtest add key c(c); The box I’m using for test is …. I used 10mil row table which would look as following in terms of data and index size: mysql> … and Dropping column for 128M buffer pool, sized to illustrate the case of index being significantly larger …

Post: MySQL Upgrade Webinar Questions Followup

to keep into account possible query changes, replication etc. Q: Is it possible to move MyISAM to Innodb through plain ALTER…Q: What are the key concerns upgrading MySQL 4.1 to MySQL 5.5? This…used in production) which adds the difference compared to your production use. If resources allow I prefer to

Post: Find and remove duplicate indexes

MySQL will avoid to create duplicate indexes: mysql> alter table t add index key_for_first_name(name); Query OK, 0 rows affected (0.01 sec) mysql> alter table t add index key_for_first_name(name); ERROR 1061 (42000): Duplicate key name ‘key_for_first_name’ Using custom names with…

Post: Should you name indexes while doing ALTER TABLE ?

to it, for example: mysql> create table t1(i int, j int); Query OK, 0 rows affected (0.01 sec) mysql> alter table t1 add key… – you can’t easily see what is the index MySQL trying to use from explain, such as if you have some smart index… would specify index name MySQL will complain if you try to create index with same name again: mysql> alter table t1 add key idx_i(i…

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

… whom the prudent move would be a migration to InnoDB, but due to their use of MyISAM FTS, the idea of a complete… to CREATE more than one at a time. If you try it, this is what happens: mysql> alter table dir_test_innodb ADD FULLTEXT KEY (full_name, details), ADD FULLTEXT KEY (details); ERROR 1795 (HY000): InnoDB…

Post: Concatenating MyISAM files

mysql: mysql> use test Database changed mysql> flush tables; Query OK, 0 rows affected (0.00 sec) mysqlmysql> alter table test_concat add data varchar(10); Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> alter

Post: Find unused indexes

to use the benchmark software tpcc-mysql. After some runs we can start to analyze the information on INDEX_STATISTICS table. mysqlKEY `fkey_order_line_2`; — type:non-unique ALTER TABLE `tpcc`.`orders` DROP KEY `idx_orders`; — type:non-unique ALTER TABLE `tpcc`.`stock` DROP KEY

Post: High-Performance Click Analysis with MySQL

… then add the rest later, reloading the data if needed. Aggregate Aggregation is absolutely key for…from the downtime caused by ALTER TABLE — a typical reason to think about master-master …to MySQL, although we’re most famous for our knowledge about it.  When another tool is the right one, we use