From: Tom Lane <tgl@sss.pgh.pa.us>
To: PostgreSQL Server <postgres@rsd.it>
Cc: pgsql-sql@postgresql.org
Subject: Re: DATE TIME INDEX ?
Date: Sat, 16 Nov 2002 13:42:08 -0500
Message-ID: <19219.1037472128@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.44.0211161743400.8254-100000@sunrise2.radiostudiodelta.it>
References: <Pine.LNX.4.44.0211161743400.8254-100000@sunrise2.radiostudiodelta.it>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, postgres@rsd.it
Subject: Re: DATE TIME INDEX ?
In-Reply-To: <19219.1037472128@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox