Partial Indexes and Filtered Indexing Strategies

A deep dive into the mechanics of partial indexes, covering predicate pushdown, storage efficiency, and scenarios where filtered indexing outperforms standard B-Tree structures.

Sample Questions

  1. What is the primary definition of a partial or filtered index?

    • An index that includes only a subset of the rows in a table based on a predicate.
    • An index that only contains a subset of columns from a table.
    • An index that is only active during specific hours of the day.
    • An index that is automatically deleted after a certain period.
  2. In PostgreSQL, which clause is used to create a partial index?

    • HAVING
    • WHERE
    • FILTER
    • LIMIT
  3. What is a major storage benefit of using filtered indexes?

    • They encrypt data automatically to save space.
    • They reduce the physical size of the index on disk by excluding irrelevant rows.
    • They allow the database to skip the transaction log.
    • They compress the entire table into a smaller format.