Re: Index question - Mailing list pgsql-sql

From Tom Lane
Subject Re: Index question
Date
Msg-id 28006.1076650702@sss.pgh.pa.us
Whole thread Raw
In response to Index question  ("David Witham" <davidw@unidial.com.au>)
List pgsql-sql
"David Witham" <davidw@unidial.com.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


pgsql-sql by date:

Previous
From: "Kumar"
Date:
Subject: Re: How to avoid nulls while writing string for dynamic query
Next
From: "Kumar"
Date:
Subject: Re: How to avoid nulls while writing string for dynamic query