Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group