News for hackers. Stuff that matters.
Re:Database development mistakes made by application developers by simonw on Monday December 13, 2010 @07:18AM (#2000201)
> (If you build an index on surname, firstname and dob, but execute select * from users where firstname="Bob" and surname="Jones", the index won't be used).

I did not know that - I always thought that a compound index would be used for a query against a subset of those columns provided the subset was a prefix of the overall list - so in your example, a query on surname would use the index but a query on firstname and dob would not.

Re:Database development mistakes made by application developers by morgo on Monday December 13, 2010 @10:27AM (#2000705)
The poster corrected himself above - it's not the case.