MySQL

InnoDB isolation levels

December 20, 2010
By

When asking what THE advantage of InnoDB over other MySQL engines like MyISAM is, then 9 out of 10 times the answer will be that InnoDB supports transactions. And it’s true. But there is more about transactions than meets the eye. Let’s explore one of the most difficult area’s: isolation levels.

Read more »

Composite key autoincrements

December 17, 2010
By

Autoincrement is sometimes called a “poor-man-sequence”. Sequences in other DB systems are counters that can be used for automatically number fields when inserting data, just like autoincrement in MySQL does, but they can be much more complex. However, in MySQL you do not always you want or need increments of 1. Sometimes you need something…

Read more »

About using UTF-8 fields in MySQL

December 4, 2010
By

I sometimes hear: “make everything utf-8 in your database, and all will be fine”. This so-called advice could not be further from the truth. Indeed, it will take care of internationalization and code-page problems when you use UTF-8, but it comes with a price, which may be too high for you to pay, especially if…

Read more »

Cardinality & Selectivity

February 7, 2010
By
Cardinality & Selectivity

Cardinality and selectivity are two keywords that are very important when dealing with optimization in MySQL queries and indexes. This article will go a bit in depth on both terms and tries to let you understand their usefulness…

Read more »

Covering indices

December 22, 2009
By

It’s almost to easy to use a “SELECT * FROM” query in your code. First of all, you instantly get all the fields from your database so you don’t have to worry about changing your queries when you decide to use other fields (in case you don’t use a DAL). However, there are some drawbacks…

Read more »