Problem Statement
When is a partial (filtered) index a strong optimization?
Explanation
A partial index stores only rows that satisfy a predicate. It stays small and hot for common filters, reducing I/O and maintenance cost.
Code Solution
SolutionRead Only
-- PostgreSQL CREATE INDEX idx_active ON users(email) WHERE active = true;
Practice Sets
This question appears in the following practice sets:
