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
- Any change in the speed of the site? (General Chat) - Ben, May 11, 18:07:23
- speedy here but (General Chat) - fleckmatic, May 11, 18:47:18
- Do you know much about databases? (General Chat) - Ben, May 11, 18:55:41
- Indexing (General Chat) - fleckmatic, May 11, 19:07:25
- Do you know much about persistent connections? (General Chat) - Ben, May 11, 19:25:55
- Thanks (General Chat) - Ben, May 11, 19:13:40
- Indexing (General Chat) - fleckmatic, May 11, 19:07:25
- Do you know much about databases? (General Chat) - Ben, May 11, 18:55:41
- it's not Sunday yet. Anything you can do about that? (n/m) (General Chat) - 11_59 to zero, May 11, 18:08:17
- seems to of picked up (n/m) (General Chat) - jonah3000, May 11, 18:07:54
- speedy here but (General Chat) - fleckmatic, May 11, 18:47:18
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.