June 19, 2013

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

duplicate-key-checker –tables test.test # ######################################################################## # test.test # ######################################################################## # Key redundant ends with a prefix of the clustered index # Key definitions: # KEY

Post: Is your MySQL buffer pool warm? Make it sweat!

….1 –mysql-username playback –mysql-password PaSSwOrd –mysql-schema schema_name –query-log-stdin –dispatcher-plugin thread-pool –thread-pool-threads… statements that match no rows or insert statements that have duplicate key errors may be faster than an actual database write. The…

Post: Find and remove duplicate indexes

…_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 namekey_for_first_name‘ Using custom names with indexes is a good practice because they can avoid duplicates

Post: Should you name indexes while doing ALTER TABLE ?

Duplicates: 0 Warnings: 0 mysql> alter table t1 add key idx_i(i); ERROR 1061 (42000): Duplicate key name ‘idx_i’ Adding indexes without name specified is very common reason why systems tend to get duplicate indexes. BTW make…

Post: Duplicate indexes and redundant indexes

… is duplicate index ? This is when table has multiple indexes defined on the same columns. Sometimes it is indexes with different names… on update/insert delete. Duplicate keys are bad so once you find them get rid of them. Note: Duplicate indexes apply to indexes… long values using KEY(A) might be much faster than using KEY(A,B). So unlike in case of duplicate indexes it is…

Post: ANALYZE: MyISAM vs Innodb

… Records: 245760 Duplicates: 0 Warnings: 0 mysql> show index from antest_innodb; +—————+————+———-+————–+————-+———–+————-+———-+——–+——+————+———+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation…

Comment: INSERT ON DUPLICATE KEY UPDATE and summary counters.

… which I’m checking whether LAN(my unique key) is duplicate or not,if it duplicate then update the record else insert that…, ro_transfer_status,main_ro_transfer_status,ro_name,main_ro_name from viewromappingfinal on duplicate key update LAN=values(LAN) it’s working fine if i won’t use romappingfinalid(table primary key

Post: Edge-case behavior of INSERT...ODKU

KEY. The queries being run against this table were almost exclusively INSERT … ON DUPLICATE KEY UPDATE …): Duplicate entry ’4294967295′ for key ‘PRIMARY’ (root@localhost) [test]> show status like ‘handler%’; *** some rows omitted *** +—————————-+——-+ | Variable_name | Value …

Post: How Percona does a MySQL Performance Audit

…, like this: +———————————–+———————-+———————-+ | Variable_name | Value | Value | +———————————–+———————-+———————-+ | Aborted_clients | 205174… tables, running mk-duplicate-key-checker to find redundant…

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

… performance but with a small cost. Queries like INSERT … ON DUPLICATE KEY UPDATE produce gaps on the auto_increment column. To avoid…` int(11) NOT NULL AUTO_INCREMENT, `name` int(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uniqname` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT…