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 F2143D1B4CE for ; Mon, 5 Jan 2004 06:56:34 +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 15368-02 for ; Mon, 5 Jan 2004 02:55:46 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 9E5D7D1B456 for ; Mon, 5 Jan 2004 02:55:44 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i056th19022765; Mon, 5 Jan 2004 01:55:43 -0500 (EST) To: siracusa@mindspring.com Cc: pgsql-performance@postgresql.org Subject: Re: Use my (date) index, darn it! In-reply-to: References: Comments: In-reply-to John Siracusa message dated "Sun, 04 Jan 2004 18:36:16 -0500" Date: Mon, 05 Jan 2004 01:55:43 -0500 Message-ID: <22764.1073285743@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/25 X-Sequence-Number: 5200 John Siracusa writes: > Obviously the planner is making some bad choices here. A fair conclusion ... > I know that it is trying to avoid random seeks or other scary things > implied by a "correlation" statistic that is not close to 1 or -1, but > it is massively overestimating the hit caused by those seeks and > seemingly not taking into account the size of the table! You haven't given any evidence to support these conclusions, though. Could we see some table schemas, EXPLAIN ANALYZE output, and relevant pg_stats entries for the various cases? regards, tom lane