Indexes on booleans are not as useful as people tend to think. On my laptop using postgres (default configuration) index was only used when <= 20% of rows satisfied the target value.
Most of the time, people add indexes for boolean columns like admin, deleted, banned, which have a distribution of 1% vs 99%, so the partial index would help.
So, I propose to suggest removing indexes on boolean fields or make them partial.
Indexes on booleans are not as useful as people tend to think. On my laptop using postgres (default configuration) index was only used when <= 20% of rows satisfied the target value.
Most of the time, people add indexes for boolean columns like
admin
,deleted
,banned
, which have a distribution of 1% vs 99%, so the partial index would help.So, I propose to suggest removing indexes on boolean fields or make them partial.