Indexes
- Data structure used to speed access to tuples of a relation, given one or more attributes
CREATE INDEX <name> ON <table>(<attrs>)
- Using
- Given a value v, the index takes us to only those tuples that have v in the attributes of the index
- For multi-value indexes, the values are concatenated in order
- That means it considers the first attribute first
- Implemented using a B Tree or a Hash Table
Database Tuning
- Which indexes and views to create
- Can either be manual or automatic
- Tuning advisors is a major area of research
- Index Impact
- Pro: An index speeds up queries that use it
- Con: An index slows down all modification because the index must be modified too