Re: DATE TIME INDEX ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: PostgreSQL Server <postgres(at)rsd(dot)it>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: DATE TIME INDEX ?
Date: 2002-11-16 18:42:08
Message-ID: 19219.1037472128@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

PostgreSQL Server <postgres(at)rsd(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-11-16 19:06:20 Re: INDEX PROBLEMS ?
Previous Message PostgreSQL Server 2002-11-16 18:04:32 INDEX PROBLEMS ?