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 on May 11th 2005 at 19:07:25


Message Thread


Reply to Message

In order to add a post to the WotB Message Board you must be a registered WotB user.

If you are not yet registered then please visit the registration page. You should ensure that their browser is setup to accept cookies.

Log in