X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 35EE7D1BA46 for ; Sun, 22 Feb 2004 23:40:30 +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 98300-01 for ; Sun, 22 Feb 2004 19:40:29 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 02F9AD1BA3B for ; Sun, 22 Feb 2004 19:40:26 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1MNeRPU019442; Sun, 22 Feb 2004 18:40:27 -0500 (EST) To: siracusa@mindspring.com Cc: Postgres Performance Subject: Re: Column correlation drifts, index ignored again In-reply-to: References: Comments: In-reply-to John Siracusa message dated "Sun, 22 Feb 2004 17:34:47 -0500" Date: Sun, 22 Feb 2004 18:40:26 -0500 Message-ID: <19441.1077493226@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/255 X-Sequence-Number: 5779 John Siracusa writes: > I think the key is to get the planner to correctly ballpark the number of > rows in the date range. I thought it was. What you showed was -> Index Scan using mytable_date_idx on mytable (cost=0.00..3071.70 rows=52155 width=23) (actual time=2.610..1688.111 rows=49679 loops=1) which seemed plenty close enough to me. regards, tom lane