RE: SQL // Database questions
Indexing accelerates sorts and searches on indexed columns. There's a small space penalty, as the index does need to be stored, but the speed gains far outweigh the space usage.
It's especially good when joining two tables, as the index makes it trivial to find the right tuple in the entity with the primary key, and join it to the tuple in the entity with the foreign key.
|