EmergencyEMERGENCY? Get 24/7 Help Now!

Using MyISAM in production

 | June 17, 2006 |  Posted In: Insight for DBAs

There were recently number of posts about MyISAM, for example Arjen wrote pretty nice article about MyISAM features so I thought I would share my own view on using MyISAM in production. For me it is not only about table locks. Table locks is only one of MyISAM limitations you need to consider using it […]

Read More

MyISAM concurrent insert

 | June 13, 2006 |  Posted In: Benchmarks, Insight for DBAs

Arjen posted a good note about MyISAM concurrent-insert features, though I should mention concurrent-insert can be cause of scalablity and peformance problems on SMP boxes, especially on queries processing range-queries. The reason of problems is POSIX read-write locks, which are used to protect key_buffer from concurrent changes and called for each processed row. More info […]

Read More

Why MySQL could be slow with large tables ?

 | June 9, 2006 |  Posted In: Insight for DBAs

If you’ve been reading enough database related forums, mailing lists or blogs you probably heard complains about MySQL being unable to handle more than 1.000.000 (or select any other number) rows by some of the users. On other hand it is well known with customers like Google, Yahoo, LiveJournal,Technocarati MySQL has installations with many billions […]

Read More

InnoDB thread concurrency

 | June 5, 2006 |  Posted In: Insight for DBAs

InnoDB has a mechanism to regulate count of threads working inside InnoDB. innodb_thread_concurrency is variable which set this count, and there are two friendly variables innodb_thread_sleep_delay and innodb_concurrency_tickets. I’ll try to explain how it works. MySQL has pluginable architecture which divides work between mysql common code (parser, optimizer) and storage engine. From storage engine’s point […]

Read More

InnoDB page size

 | June 4, 2006 |  Posted In: Insight for DBAs

As maybe you know InnoDB uses hard page size 16Kb for datafiles and for buffer pool. However this size can be changed if you need it for your workload. go to file innobase/include/univ.i, lines:

UNIV_PAGE_SIZE is page size (as you see – default value 16Kb). Possible values for UNIV_PAGE_SIZE is 8K, 16K, 32K, 64K. […]

Read More

Indexes in MySQL

 | June 2, 2006 |  Posted In: Insight for DBAs

MySQL does not always make a right decision about indexes usage. Condsider a simple table:

; 250001 (V1)

; 83036 (V2) (execution time = 110 ms) That is index selectivity by condition (ID1=1) is V2/V1 = 0.3321 or 33.21% It is said (e.g. book “SQL Tuning”) if selectivity over 20% then a full table […]

Read More

InnoDB memory usage

 | May 30, 2006 |  Posted In: Insight for DBAs

There are many questions how InnoDB allocates memory. I’ll try to give some explanation about the memory allocation at startup. Some important constants: NBLOCKS=count of block in innodb_buffer_pool = innodb_buffer_pool_size / 16384 OS_THREADS= if (innodb_buffer_pool_size >= 1000Mb) = 50000 else if (innodb_buffer_pool_size >= 8Mb) = 10000 else = 1000 (it’s true for *nixes, for Windows […]

Read More


 | May 29, 2006 |  Posted In: Insight for DBAs

MySQL INSERT ON DUPLICATE KEY UPDATE is very powerful but often forgotten MySQL feature. It was introduced in MySQL 4.1 but I still constantly see people unaware of it. Myself I like this feature big deal because it is designed in truly MySQL style – very efficient solution for frequent task while keeping it beautiful […]

Read More

Jeremy Cole on MySQL Replication

 | May 27, 2006 |  Posted In: Insight for DBAs

Jeremy Cole recently posted very nice post about MySQL Replication Performance. There are however few points I should comment on. Jeremy Speaks about MyISAM and Innodb in the same terms, in fact they are quite different for Replication. As you probably know MyISAM uses buffered IO so if master crashes you’re out of sync anyway […]

Read More