Indexes
An index is an auxilliary data structure used
to speed up operations that are not efficiently supported by
a table's record organisation.
CREATE INDEX IndPrice ON Books
WITH STRUCTURE = BTREE
KEY = (price)
To design the index structure take into account:
- The query workload
- The update (insert, delete, update) workload
- Operations that will benefit from the index
- Attributes that are often used
- The type of the index structure (hash versus tree)
- Index maintenance cost