From: Hannu Krosing <hannu@tm.ee>
To: Shea,Dan [CIS] <Dan.Shea@ec.gc.ca>
Cc: 'josh@agliodbs.com' <josh@agliodbs.com>
Cc: 'pgsql-performance@postgresql.org' <pgsql-performance@postgresql.org>
Subject: Re: database performance and query performance question
Date: Fri, 23 Jan 2004 01:38:37 +0200
Message-ID: <1074814717.2592.8.camel@fuji.krosing.net> (raw)
In-Reply-To: <F2D63B916C88C14D9B59F93C2A5DD33F0B911B@cisxa.cis.ec.gc.ca>
References: <F2D63B916C88C14D9B59F93C2A5DD33F0B911B@cisxa.cis.ec.gc.ca>
Shea,Dan [CIS] kirjutas N, 22.01.2004 kell 23:32:
> The end date in the previous example was actually invalid between
> '2004-01-12'::date and '2003-01-12'::date;
> There have been multiple inserts since I recreated the index but it took
> quite some time to complete the following
> PWFPM_DEV=# explain analyze select * from forecastelement where valid_time
> between '2004-01-12'::date and '2004-01-13'::date;
You could try ORDER BY to bias the optimiser towards using an index:
explain analyze
select *
from forecastelement
where valid_time > '2004-01-12'::date
order by valid_time
limit 10;
This also may be more close to what you are expecting :)
------------------
Hannu
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-performance@postgresql.org
Cc: hannu@tm.ee, Dan.Shea@ec.gc.ca, josh@agliodbs.com
Subject: Re: database performance and query performance question
In-Reply-To: <1074814717.2592.8.camel@fuji.krosing.net>
* 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