May 24, 2012

Post: Troubleshooting MySQL Memory Usage

… starts like this – you have configured MySQL to use reasonable global buffers, such as innodb_buffer_size, key_buffer_size etc, you have reasonable amount of connections…: NULL 3 rows in set (0.00 sec) Innodb Memory Usage Finally it is often helpful to check how much memory Innodb has…

Post: Join Optimizations in MySQL 5.6 and MariaDB 5.5

…optimizer_switch=’batched_key_access=on’ join_buffer_size=6M read_rnd_buffer_size=6M Also… workload Now let’s see how effective are the join optimizations…buffer_size increased to 6M, the query time was ~300s while when both the join_buffer_size and the read_rnd_buffer_size/mrr_buffer_size were set to

Post: Multi Range Read (MRR) in MySQL 5.6 and MariaDB 5.5

…, however if the buffer size is small as compared to the combined size of the secondary key tuples fetched,… ~11min to under a minute. The query time is reduced further when the buffer size is set to 4M….counts how many times the buffer used by MRR had to be reinitialized, because the buffer was small…

Post: Index Condition Pushdown in MySQL 5.6 and MariaDB 5.5 and its performance impact

… for filtering records. For example, suppose you have a key defined as: KEY `i_l_partkey` (`l_partkey`,`l_quantity`,`l_shipmode…

Post: Why you should ignore MySQL's key cache hit ratio

key_buffer_size until, when the buffer is full, Key_reads/Uptime reduces to a number you’re comfortable with. Set key_buffer_size really big, and then measure its size

Post: How is join_buffer_size allocated?

to know how various buffer sizes are used. This matters because some buffers (sort_buffer_size for example) are allocated to their full sizekey_buffer_size). There are many examples of this. What about join_buffer_size? I saw a my.cnf with a 128M join_buffer_size

Post: How much overhead is caused by on disk temporary tables

set (34.47 sec) Wow this is over 15 times better so you surely need to make sure your key_buffer_size is set to

Post: Using Multiple Key Caches for MyISAM Scalability

to use Multiple Key Caches the question is how many to use, what sizes to allocate and how to map tables to… | SET GLOBAL test_a.key_buffer_size=39514112; | | SET GLOBAL test_b.key_buffer_size=28390400; | +———————————————+ 2 rows in set

Post: What to tune in MySQL Server after installation

… was installed with default settings. I’m surprised how many people fail to provide any reasonable answer to this question, and how many servers are… much more sensitive to buffer size compared to MyISAM. MyISAM may work kind of OK with default key_buffer_size even with large data set but it will…

Post: How much memory can MySQL use in the worst case?

to key_buffer_size + (read_buffer_size + sort_buffer_sizeset sort_buffer_size to 128K — I can quite well connect and say “set @@sort_buffer_size := 1 * 1024 * 1024 * 1024;” and my sort_buffer_size