Re: Index question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Witham" <davidw(at)unidial(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Index question
Date: 2004-02-13 05:38:22
Message-ID: 28006.1076650702@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"David Witham" <davidw(at)unidial(dot)com(dot)au> writes:
> I understand that selecting count(*) will involve a scan at some
> stage, but I was surprised that the index wasn't used in the >= case,
> but was used in the between case.

Given the estimated row counts in your examples, the planner's choices
are not surprising. You have not given us any information on whether
those estimates are accurate.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kumar 2004-02-13 05:41:49 Re: How to avoid nulls while writing string for dynamic query
Previous Message Kumar 2004-02-13 04:53:58 Re: How to avoid nulls while writing string for dynamic query