Re: "where x between y and z" for timestamp data types - Mailing list pgsql-novice

From Tom Lane
Subject Re: "where x between y and z" for timestamp data types
Date
Msg-id 14441.1344806904@sss.pgh.pa.us
Whole thread Raw
In response to Re: "where x between y and z" for timestamp data types  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: "where x between y and z" for timestamp data types
List pgsql-novice
Jeff Davis <pgsql@j-davis.com> writes:
> I briefly tried your example and I didn't see a problem. Can you provide
> some sample data that illustrates your problem? Also, is the "date"
> field a date or a timestamp? And why are the upper and lower bounds of
> the BETWEEN identical?

I'll bet a nickel the planner is choosing a different plan when it
doesn't know that the timestamp range condition is extremely selective.

            regards, tom lane


pgsql-novice by date:

Previous
From: Jeff Davis
Date:
Subject: Re: "where x between y and z" for timestamp data types
Next
From: Jeff Davis
Date:
Subject: Re: Joining time fields?