Re: DATE TIME INDEX ? - Mailing list pgsql-sql

From Tom Lane
Subject Re: DATE TIME INDEX ?
Date
Msg-id 19219.1037472128@sss.pgh.pa.us
Whole thread Raw
In response to DATE TIME INDEX ?  (PostgreSQL Server <postgres@rsd.it>)
List pgsql-sql
PostgreSQL Server <postgres@rsd.it> writes:
> I found that the only way to force postgres to use index is:

> explain select id,datarx::date from docs where datarx between '2002-11-13' and '2002-11-14' ;

> Index Scan using idx_documenti_datarx on documenti  (cost=0.00..7.86 rows=2 width=12)

Given the small cost estimates, you either are testing on a toy table,
or you have not run ANALYZE since loading up the table.
        regards, tom lane


pgsql-sql by date:

Previous
From: PostgreSQL Server
Date:
Subject: INDEX PROBLEMS ?
Next
From: "Josh Berkus"
Date:
Subject: Re: INDEX PROBLEMS ?