Re: Index not used, performance problem

From: Andreas Kostyrka <andreas(at)mtg(dot)co(dot)at>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Index not used, performance problem
Date: 2003-03-29 16:59:11
Message-ID: 1048957151.7543.19.camel@andi-lap
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sat, 2003-03-29 at 14:47, Christopher Kings-Lynne wrote:
> Hi Andreas,
>
> A few points:
>
> PostgreSQL is rarely going to use an index for a boolean column. The
> reason is that since almost by definition true will occupy 50% of the rows
> and false will occupy 50% (say). In this case, a sequential scan is
> always faster. You would say that the 'selectivity' isn't good enough.
Well, perhaps it should collect statistics, because a "deleted" column
is a prime candidate for a strongly skewed population.

Andreas

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jord Tanner 2003-03-29 16:59:29 Re: Index not used, performance problem
Previous Message Andreas Kostyrka 2003-03-29 16:57:58 Re: Index not used, performance problem