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 E3762D1CCA6 for ; Thu, 22 Jan 2004 20:54:16 +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 97683-08 for ; Thu, 22 Jan 2004 16:53:47 -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 2E7EED1B4AD for ; Thu, 22 Jan 2004 16:53:44 -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 i0MKrb3P002935; Thu, 22 Jan 2004 22:53:37 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id i0MKrbq9002933; Thu, 22 Jan 2004 22:53: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: <1074804406.2592.2.camel@fuji.krosing.net> References: <1074804406.2592.2.camel@fuji.krosing.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1074804816.2592.4.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 22 Jan 2004 22:53:37 +0200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/228 X-Sequence-Number: 5402 Hannu Krosing kirjutas N, 22.01.2004 kell 22:46: > Shea,Dan [CIS] kirjutas N, 22.01.2004 kell 22:35: > > Something that I do not understand is why if you use a valid_time = > > '2004-01-22 00:00:00' the query will use the index but if you do a > > valid_time > '2004-01-22 00:00:00' it does not use the index? > > It probably can't tell if > is selective enough to justify using index. > > Together with "limit 10" it may be. > > You could try > > explain analyze select * from forecastelement where valid_time between > '2004-01-22'::date and '2004-01-22'::date limit 10; Sorry, that should have been: between '2004-01-22'::date and '2004-01-23'::date > to see if this is considered good enough. > > -------------- > Hannu > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org