News for hackers. Stuff that matters.
Re:Database development mistakes made by application developers by IgorPartola on Monday December 13, 2010 @08:17AM (#2000354)
A primary key is just a unique index. All of its other properties and uses have nothing to do with the underlying implementation. It may be slightly faster for some types of queries than a "secondary" unique index if the RDBMS clusters the data by the primary key and you are using traditional hard drives. In your example, if you indexed the content column, the lookup on it would be fast. As a bonus, make sure to read up on composite indecies. They are the bread and butter , so to speak.

There are no comments on this comment yet.