June 19, 2013

Post: Innodb performance gotcha w Larger queries.

… was replacing single value UPDATE with multiple value REPLACE (though I also saw the same problem with INSERT ON DUPLICATE KEY UPDATE) As I went from… we use is INSERT, and it does not use this function so it did not have a bug. INSERT ON DUPLICATE KEY UPDATE, REPLACE, UPDATE all should…

Comment: INSERT ON DUPLICATE KEY UPDATE and summary counters.

… == 0) mysql_query(“INSERT INTO table VALUES (’1′, ’1′)”); 3) Using INSERT .. ON duplicate KEY UPDATE .. mysql_query(“INSERT INTO table VALUES (’1′, ’1′) ON duplicate KEY UPDATE user_hits = user_hits+1 “); So.. which one is recommended? I repeat.. my update

Comment: INSERT ON DUPLICATE KEY UPDATE and REPLACE INTO

… fields that I need in the log). The trigger uses INSERT ON DUPLICATE KEY UPDATE to achieve that. The problem is that I find many… if INSERTUPDATE might lock for read access (or lock only the index, or something simmilar) while checking for key value existence, as inserts in myisam are concurrent with reads, and then try to lock for write access when performing the update

Comment: INSERT ON DUPLICATE KEY UPDATE and summary counters.

[...] use INSERT ON DUPLICATE KEY UPDATE (via MySQL Performance Blog): my $ret = $dbh->do(“INSERT INTO ipstat VALUES(inet_aton(’192.168.0.1′),1,now()) ON duplicate KEY UPDATE hits=hits+1″); Note: ip should be a primary key in this case [...]

Post: Announcing Percona Server 5.1.65-14.0

… MySQL bug #66301. Concurrent INSERTON DUPLICATE KEY UPDATE statements on a table with an AUTO_INCREMENT column could result in spurious duplicate key errors (and, as a result, lost data due to some rows being updated rather than inserted) with the default…

Post: Announcing Percona Server 5.5.27-28.0

… MySQL bug #66301. Concurrent INSERTON DUPLICATE KEY UPDATE statements on a table with an AUTO_INCREMENT column could result in spurious duplicate key errors (and, as a result, lost data due to some rows being updated rather than inserted) with the default…

Comment: Why MySQL could be slow with large tables ?

…, id2, cnt) (where the pair id1, id2 forms the primary key) using INSERTON DUPLICATE KEY UPDATE cnt = cnt + 1. Obviously, the resulting table becomes large (example: approx. 200M rows for 300K lists), and I noticed that inserts

Comment: InnoDB vs MyISAM vs Falcon benchmarks - part 1

… data before inserting into database. Each row in the CSV file used 11 queries max (5 selects, 6 insert on duplicate key updates). Using InnoDB on all… entries after import (before empty). All selects and on updates were using primary key. I’d be interested what made such difference, because…

Comment: INSERT ON DUPLICATE KEY UPDATE and summary counters.

INSERTON DUPLICATE KEY UPDATE works. As I recall: Lock 1) Transaction 1 locks row for INSERT Lock 2) Transaction 2 tries to locks row for UPDATE… queue) Lock 3) Transaction 1 tries to locks row for UPDATE (goes into queue) It is reasonable not to release Lock…’t it use Lock 1 instead of Lock 3 for UPDATE operation? Or maybe I am wrong at all?

Comment: INSERT ON DUPLICATE KEY UPDATE and summary counters.

[...] http://dev.mysql.com/doc/refman/4.1/en/insert-on-duplicate.html http://www.mysqlperformanceblog.com/2006/05/29/insert-on-duplicate-key-update-and-summary-counters/ [...]