Indexing

HI,

Simply - you need to index those columns (or groups of columns - compound indexes) that the the queries on the database search or sort on.

An index is effectivly a seperate table presorted on the index field pointing to the primary key of the table (which is already an automatic index)

For example, in a phone book, you would need to index on [Surname, Firstname] - therwise a search or sort would need to hunt through all records in the table.

As a more complex example, in a yellow pages, you would need additional indexes on town and business type.

User Posted Link

Maintaining indicies adds an overhead to the database, but that's small in comparison to the speed ups obtained on queries against them.

Posted By: fleckmatic, May 11, 19:07:25

Follow Ups

Reply to Message

Log in


Written & Designed By Ben Graves 1999-2025