June 19, 2013

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

on localhost: … connected. $ pt-duplicate-key-checker –tables test.test # ######################################################################## # test.test # ######################################################################## # Key redundant ends with a prefix of the clustered index # Key

Post: Benchmarking Percona Server TokuDB vs InnoDB

…/10, $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=VALUES…) ON DUPLICATE KEY UPDATE k=VALUES(k)+k; INSERT INTO sbtest_r1000 (hid, mid, id, k) VALUES ($HID, $MID, $ID/1000, $K) ON DUPLICATE KEY UPDATE…

Comment: MySQL Partitioning - can save you or kill you

… a standard numeric key id, set as a Primary Key, it will probably be quicker, or the same response, on a normal table… long term to read from a partitioned table, as, depending on the size of the partitions, the whole partition can be… out of the partition, not the whole table. 3. Insert on Duplicate Key (I dont do replace… ever)… if across partitions, will be…

Comment: Benchmarking Percona Server TokuDB vs InnoDB

2 Andy. I mean that in most queries (99%) data was only inserted, not updated. I inserted data with mostly unique PK, That is part ON DUPLICATE KEY was not triggered.

Comment: Benchmarking Percona Server TokuDB vs InnoDB

… mean by that? In your tests you ran many INSERT .. ON DUPLICATE KEY UPDATE queries. That’s upsert, no? TokuDB seems to work…

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

…! There are numerous solutions for MySQL high availability. Many rely on MySQL’s asynchronous replication to maintain a warm standby server… these high-availability solutions it means that mysqld is running on the standby server and that replication is not lagging. Unfortunately… statements that match no rows or insert statements that have duplicate key errors may be faster than an actual database write. The…

Post: Repair MySQL 5.6 GTID replication by injecting empty transactions

… because of an error: Last_SQL_Error: Error ‘Duplicate entry ’4′ for key ‘PRIMARY” on query. Default database: ‘test’. Query: ‘insert into t…

Post: INSERT ON DUPLICATE KEY UPDATE and summary counters.

INSERT … ON DUPLICATE KEY UPDATE is very powerful but often forgotten MySQL feature. It … key, hits int unsigned not null, last_hit timestamp); insert into ipstat values(inet_aton(’192.168.0.1′),1,now()) on duplicate key…=1 if it is already where (note ip is PRIMARY KEY) it would be just incremented and last visit timestamp updated…

Post: INSERT ON DUPLICATE KEY UPDATE and REPLACE INTO

Jonathan Haddad writes about REPLACE INTO and INSERT ON DUPLICATE KEY UPDATE. Really, Why MySQL has both of these, especially both … NULL value, as col1 is undefined at this stage. INSERT ON DUPLICATE KEY UPDATE is newer feature which came in MySQL 4.1…

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

… lock on AUTO-INC. We have recovered the concurrency and the performance but with a small cost. Queries like INSERT … ON DUPLICATE KEY UPDATE produce gaps on the auto_increment column. To avoid this little inconvenience…