I've been debating with a collegue who argues that indexing a
boolean column is a BAD idea and that is will actually slow
down queries.
My plan is to have a table with many rows sharing 'versions'
(version/archive/history) of data where the most current row
is the one where 'is_active' contains a t
"D. Dante Lorenso" <[EMAIL PROTECTED]> writes:
> Does it make sense to have an index on data_is_active?
Hard to say. You weren't very clear about what fraction of the table
rows you expect to have data_is_active = true. If that's a very small
fraction, then an index might be worthwhile.
However
Will an index on the 'data_is_active' column be used or work
as I expect? I'm assuming that I may have a million entries
sharing the same 'data_lookup_key' and I'll be using that to
search for the active version of the row.
An index just on a boolean column won't be 'selective enough'. eg. The
i
Christopher Kings-Lynne wrote:
> > Will an index on the 'data_is_active' column be used or work
> > as I expect? I'm assuming that I may have a million entries
> > sharing the same 'data_lookup_key' and I'll be using that to
> > search for the active version of the row.
> An index just on a boole