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 6A4B7D1E3E0 for ; Thu, 22 Jan 2004 20:48:00 +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 01859-07 for ; Thu, 22 Jan 2004 16:47:31 -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 1C1CDD1B4AD for ; Thu, 22 Jan 2004 16:47:28 -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 i0MKkn3P002921; Thu, 22 Jan 2004 22:46:50 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id i0MKklEI002919; Thu, 22 Jan 2004 22:46:47 +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: <1074804406.2592.2.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 22 Jan 2004 22:46:46 +0200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/227 X-Sequence-Number: 5401 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; to see if this is considered good enough. -------------- Hannu