Database indexes

The primary key of a database table will be indexed. Indexing speeds up finding a specific record just as a book index helps a reader to find a specific topic. Indexes can also be added to any other field which might need to be searched for.

Foreign keys should be indexed as they will be used to select records regularly.

Indexes take up space and have to be maintained so they do slow down the database. If a field will not be searched often do not index it.

submit to reddit Delicious Tweet