Buy Percona ServicesBuy Now!

Redundant index is not always bad

 | August 28, 2007 |  Posted In: Benchmarks, Insight for DBAs

About year ago Peter wrote about redundant indexes and mentioned sometimes it is good to leave two indexes, even one is first part of another. I’m speaking about BTREE indexes, for example, KEY (A), and KEY (A,B). From SQL point of view KEY(A) is not needed, as for queries like WHERE A=5 the index (A,B) […]

Read More

Memory allocation in Stored Function

 | August 26, 2007 |  Posted In: Insight for DBAs

UPDATE : Post is not actual anymore Not so long time ago I had task to update string column in table with 10mil+ rows, and, as the manipulation was non-trivial, I decided this task is good to try Stored Function. Function written – go ahead. Since 5 min I got totally frozen box with no […]

Read More

MySQL VIEW as performance troublemaker

 | August 12, 2007 |  Posted In: Insight for DBAs

I start to see applications being built utilizing VIEWs functionality which appeared in MySQL 5.0 and quite frequently VIEWs are used to help in writing the queries – to keep queries simple without really thinking how it affects server performance. Even worse than that – looking at the short table which just gets single row […]

Read More

More Gotchas with MySQL 5.0

 | July 27, 2007 |  Posted In: Insight for DBAs

Working on large upgrade of MySQL 4.1 running Innodb to MySQL 5.0 and doing oprofile analyzes we found very interesting issue of buf_get_latched_pages_number being responsible for most CPU usage. It did not look right. The close look revealed this is the function which is used to compute number of latched pages in Innodb Buffer Pool, […]

Read More

MySQL 5.0 Community Edition Regression

 | July 27, 2007 |  Posted In: Insight for DBAs

It is true you might be better of being unaware about problems, because in this case you might not run into them 🙂 Just couple of days ago Kaj Arno told me there are issues reported with SHOW PROFILE patch available in latest MySQL Community Edition and I’ve been troubleshooting customer affected by one of […]

Read More

What exactly is read_rnd_buffer_size

 | July 24, 2007 |  Posted In: Insight for DBAs

Looking for documentation for read_rnd_buffer_size you would find descriptions such as “The read_rnd_buffer_size is used after a sort, when reading rows in sorted order. If you use many queries with ORDER BY, upping this can improve performance” which is cool but it does not really tell you how exactly read_rnd_buffer_size works as well as which […]

Read More