X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8F7E9D1B4AA for ; Thu, 22 Jan 2004 23:39:39 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 96620-02 for ; Thu, 22 Jan 2004 19:39:11 -0400 (AST) Received: from fuji.krosing.net (217-159-136-226-dsl.kt.estpak.ee [217.159.136.226]) by svr1.postgresql.org (Postfix) with ESMTP id 7CC21D1B4AD for ; Thu, 22 Jan 2004 19:39:07 -0400 (AST) Received: from fuji.krosing.net (localhost.localdomain [127.0.0.1]) by fuji.krosing.net (8.12.8/8.12.8) with ESMTP id i0MNcd3P003177; Fri, 23 Jan 2004 01:38:39 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id i0MNcbv8003175; Fri, 23 Jan 2004 01:38:37 +0200 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: database performance and query performance question From: Hannu Krosing To: "Shea,Dan [CIS]" Cc: "'josh@agliodbs.com'" , "'pgsql-performance@postgresql.org'" In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1074814717.2592.8.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 23 Jan 2004 01:38:37 +0200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/232 X-Sequence-Number: 5406 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