An index and materialized view selection wizard produces a fast and
reasonable recommendation for a configuration of indexes, materialized
views, and indexes on materialized views which are beneficial given a
specified workload for a given database and database server. Candidate
materialized views and indexes are obtained, and a joint enumeration of
the combined materialized views and indexes is performed to obtain a
recommended configuration. The configuration includes indexes,
materialized views and indexes on materialized views. Candidate
materialized views are obtained by first determining subsets of tables are
referenced in queries in the workload and then finding interesting table
subsets. Next, interesting subsets are considered on a per query basis to
determine which are syntactically relevant for a query. Materialized views
which are likely to be used for the workload are then generated along with
a set of merged materialized views. Clustered indexes and non-clustered
indexes on materialized views are then generated. The indexes,
materialized views and indexes on materialized views are then enumerated
together to form the recommended configuration.