Re: Indexing a Boolean or Null column? - Mailing list pgsql-performance

From Christopher Kings-Lynne
Subject Re: Indexing a Boolean or Null column?
Date
Msg-id 3FF7BF29.8070401@familyhealth.com.au
Whole thread Raw
In response to Re: Indexing a Boolean or Null column?  ("D. Dante Lorenso" <dante@lorenso.com>)
Responses Re: Indexing a Boolean or Null column?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
> Ok, so ...evenly distributed data on small set of values forces
> sequential scan since that's faster.  I expected that based on
> what I've read so far.

Actually, it's more a case of that fetching an item via and index is
considered, say, four times slower than fetching something off a
sequential scan (sort of).  Hence, if you are selecting more than 25% of
the table, then a sequential scan will be faster, even though it has to
process more rows.

Chris


pgsql-performance by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Indexing a Boolean or Null column?
Next
From: Tom Lane
Date:
Subject: Re: Indexing a Boolean or Null column?