4 ms·
Another benefit of partial indexes is to limit a unique constraint: create index users_email on users(email) where status != 'delete'
by latch 6y ago
Another benefit of partial indexes is to limit a unique constraint:
create index users_email on users(email) where status != 'delete'
- SomeHacker44 6y agoBe very careful, then, as the optimizer will (usually?) not use the index if the condition is not part if the query.
- jackTheMan 6y agoyou can create views for that, then it will be always part of the query.