May 24, 2012

Post: InnoDB's gap locks

… SELECT FOR UPDATE. InnoDB provides REPEATABLE READ for read-only SELECT, but it behaves as if you use READ COMMITTED for all write queries… row lock(s), undo log entries 1 MySQL thread id 3, OS thread handle 0x7f84a78ba700, query id 163 localhost msandbox TABLE LOCK table `test`.`t` trx id 72C lock mode IX RECORD LOCKS space id 19 page no 4 n bits 80 index `age` of table

Post: Index lock and adaptive search - next two biggest InnoDB problems

… problem is index->lock mutex. InnoDB uses single mutex per index, so when you run mixed read / write queries, InnoDB locks index for write operation and…write queries at the same time. InnoDB again uses single global mutex for adaptive_search (single mutex for ALL table and ALL indexes), so write

Post: SHOW INNODB STATUS walk through

… of tables locked by transactions. Innodb does not lock tables for normal operation so number of tables locked normally stays 0, unless it is ALTER TABLE … pool also stores lock information, adaptive hash indexes and some other system structures. Pending reads and writes are pending requests on …

Post: INSERT INTO ... SELECT Performance with Innodb tables.

… 14 SEC FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 0 page no 33504 n bits 328 index `j` of table `test/sample` trx id 0 42304626 lock_mode X locks rec but not gap waiting Record lock, heap no… not see any write activity. Other transaction which happes to be simple primary key update is waiting on sample table for this record…

Post: Using Multiple Key Caches for MyISAM Scalability

for the same table, for example caching even/odd key blocks or something similar, or actually just keep hash of locks

Post: Neat tricks for the MySQL command-line pager

…. Hmm, you know what that means? It means you can write your own script and push the output through it. You… 50 SEC FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 0 page no 52 n bits 72 index `GEN_CLUST_INDEX` of table `test/t` trx id 0 14615 lock_mode…

Post: Tuning for heavy writing workloads

… and tuned for the benchmark. I will show you the tunings. It should be also tuning procedure for general heavy writing workloads. At… output. “xx-lock on RW-latch at 0x7f2ff40a3dc0 created in file dict/dict0dict.c line 1627″ It is index->lock, viewing the source file (and it may be HISTORY table). This is the lock for each index tree. We may…

Post: MySQL Slow query log in the table

… statement. As default table format for slow_log is CSV with no indexes typical operations like finding …For example you can’t ALTER log table while query is running, neither you can delete rows from it (or do any write… log queries which is used if log table is locked. One thing which would be rather…

Post: Learning about MySQL Table Fragmentation

… enough the “cure” for both fragmentation issues is the same – OPTIMIZE TABLE tbl – this command recreates the table by writing the new .ibd file (if you’re using innodb_file_per_table=1) which… requires table to be locked while it is being rebuilt and also it really only defragments clustered key but not the index. P…

Post: Ultimate MySQL variable and status reference list

lock_wait_timeoutblogpercona.commanual innodb_locks_unsafe_for…max_write_lock_…table_definition_cacheblogpercona.commanual table_lock_wait_timeoutblogpercona.commanual Table_locks_immediateblogpercona.commanual Table_locks_waitedblogpercona.commanual table_open_cacheblogpercona.commanual table