Comment

Comment by alt_f4

One kind of significant downside of partial indexes in PostgreSQL is that they don't work with parameters. Like, if you have a partial index on username_id, this will work:

select * from users where username_id = 5;

but this won't use the index:

select * from users where username_id = (select 5);

Basically, the query planner won't evaluate the parameter before it decides what strategy to use.

parent alt_f4 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton