X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 348ECD1B51B for ; Tue, 11 Nov 2003 01:11:08 +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 31006-04 for ; Mon, 10 Nov 2003 21:10:39 -0400 (AST) Received: from web21402.mail.yahoo.com (web21402.mail.yahoo.com [216.136.232.72]) by svr1.postgresql.org (Postfix) with SMTP id 07D02D1B51A for ; Mon, 10 Nov 2003 21:10:36 -0400 (AST) Message-ID: <20031111011039.18349.qmail@web21402.mail.yahoo.com> Received: from [64.81.205.234] by web21402.mail.yahoo.com via HTTP; Mon, 10 Nov 2003 17:10:39 PST Date: Mon, 10 Nov 2003 17:10:39 -0800 (PST) From: ow Subject: Re: pg 7.4.rc1, Range query performance To: Bruce Momjian Cc: pgsql-sql@postgresql.org In-Reply-To: <200311110050.hAB0ouQ11856@candle.pha.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/106 X-Sequence-Number: 15921 --- Bruce Momjian wrote: > Strange 30 records takes 30x the time than one record. Can you run > ANALYZE and send us an EXPLAIN of the query to make sure it hasn't > changed? > explain analyze select * from Test where a >= '2002-06-18' and a <= '2002-07-18' and b = 5 and c = 255 QUERY PLAN Index Scan using ak_abc on test (cost=0.00..121.23 rows=34 width=53) (actual time=18.060..10726.387 rows=31 loops=1) Index Cond: (((a)::timestamp without time zone >= '2002-06-18 00:00:00'::timestamp without time zone) AND ((a)::timestamp without time zone <= '2002-07-18 00:00:00'::timestamp without time zone) AND ((b)::integer = 5) AND ((c) (..) Total runtime: 10726.663 ms Thanks __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree