14.10

Suppose you are given a database schema and some queries that are executed frequently. How would you use the above information to decide what indices to create?


Indices on any attributes on which there are selection conditions; if there are only a few distinct values for that attribute, a bitmap index may be created, otherwise a normal B+-tree index.

B+-tree indices on primary-key and foreign-key attributes.

Also indices on attributes that are involved in join conditions in the queries.