June 19, 2013

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

… an error and the second ALTER will fail, preventing the creation of the duplicate index. Does it mean that tools like pt-duplicate-key… pt-duplicate-key-checker –tables test.test # ######################################################################## # test.test # ######################################################################## # Key redundant ends with a prefix of the clustered index # Key definitions: # KEY `redundant…

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

… statements that match no rows or insert statements that have duplicate key errors may be faster than an actual database write. The slow…

Post: Benchmarking Percona Server TokuDB vs InnoDB

…, $K) ON DUPLICATE KEY UPDATE k=VALUES(k)+k; INSERT INTO sbtest_r100 (id, k) VALUES ($ID/100, $K) ON DUPLICATE KEY UPDATE k=VALUES(k)+k; INSERT INTO sbtest_r1000 (id, k) VALUES ($ID/1000, $K) ON DUPLICATE KEY UPDATE k… max_connections = 2000 max_prepared_stmt_count=500000 max_connect_errors = 10 table_open_cache = 2048 max_allowed_packet = 16M binlog…

Comment: MySQL Partitioning - can save you or kill you

… ‘Insert’ part. 1. With a standard numeric key id, set as a Primary Key, it will probably be quicker, or the same… of the partition, not the whole table. 3. Insert on Duplicate Key (I dont do replace… ever)… if across partitions, will be… to delete. However, thank you Rick for pointing out my error in the original post…. it was misleading, but wasn’t…

Post: Repair MySQL 5.6 GTID replication by injecting empty transactions

… slave server is not working because of an error: Last_SQL_Error: ErrorDuplicate entry ’4′ for key ‘PRIMARY” on query. Default database: ‘test’. Query…

Post: INSERT ON DUPLICATE KEY UPDATE and summary counters.

INSERT … ON DUPLICATE KEY UPDATE is very powerful but often forgotten MySQL feature. It … values(inet_aton(’192.168.0.1′),1,now()) on duplicate key update hits=hits+1; This example actually shows one more… is even more important the application code becomes simplier – less error prone and easy to read.

Post: Conflict Avoidance with auto_increment_increment and auto_increment_offset

… the table with unique keys and non auto increment primary keys. The problem is duplicate key error is one of the few errors statement based replication… found in addition to duplicate key errors, if you set slave_exec_mode=IDEMPOTENT both duplicate key error and row not found errors will be ignored. Strict…

Post: Find and remove duplicate indexes

…) 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 indexes is a good practice because they can avoid duplicates and…

Post: Percona Toolkit 2.1.9 is ready

…/en/mariadb-5528-changelog/) fixed a bug: “Added warnings for duplicate key errors when using INSERT IGNORE”. However, standard MySQL does not warn… intended to ignore duplicate entry errors by using “INSERT IGNORE”, it now handles the MariaDB case by also ignoring duplicate entry errors in the…

Comment: INSERT ON DUPLICATE KEY UPDATE and summary counters.

… affected INSERT IGNORE INTO test (md5) values (‘A’) Duplicate entry ‘A’ for key ‘md5′ I think an incredibly useful feature here would… duplicate key error. This would save us a select statement (either before or after the insert) to determine which row caused the dupe error… answer (why not just use on duplicate key update?) Well this is because i want “on duplicate key return unique_row_id” Cheers //Steve