pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: D. Dante Lorenso <dante@lorenso.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Indexing a Boolean or Null column?
Date: Sun, 04 Jan 2004 15:22:17 +0800
Message-ID: <3FF7BF29.8070401@familyhealth.com.au> (raw)
In-Reply-To: <3FF7A395.4050106@lorenso.com>
References: <3FF769EA.7090508@lorenso.com>
	<3FF79764.6060805@familyhealth.com.au>
	<3FF7A395.4050106@lorenso.com>

> 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




view thread (8+ messages)  latest in thread

Message-ID: <3FF7BF29.8070401@familyhealth.com.au>
Permalink:  ../3FF7BF29.8070401@familyhealth.com.au/
Also on:    postgresql.org/message-id/3FF7BF29.8070401@familyhealth.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: chriskl@familyhealth.com.au, dante@lorenso.com
  Subject: Re: Indexing a Boolean or Null column?
  In-Reply-To: <3FF7BF29.8070401@familyhealth.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox