AdvancedPerformance & Indexes
Create a Partial Index
The query
SQL
CREATE INDEX idx_active_employees
ON employees (last_name)
WHERE status = 'active';Note
“Indexes only a subset of data. Much smaller and faster to update than a full index. Perfect for soft-deletes or status flags.