X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 46412D1B4E2 for ; Mon, 11 Aug 2003 23:53:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 58178-08 for ; Mon, 11 Aug 2003 20:51:42 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 43456D1B524 for ; Mon, 11 Aug 2003 20:52:59 -0300 (ADT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3503835; Mon, 11 Aug 2003 16:52:46 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Tom Lane Subject: Re: Odd problem with performance in duplicate database Date: Mon, 11 Aug 2003 16:51:01 -0700 User-Agent: KMail/1.4.3 References: <200308111559.09924.josh@agliodbs.com> <26934.1060644171@sss.pgh.pa.us> In-Reply-To: <26934.1060644171@sss.pgh.pa.us> Cc: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200308111651.01597.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/185 X-Sequence-Number: 3002 Tom, > Let's see the pg_stats rows for case_clients in both databases. The > entries for trial_groups might be relevant too. My reading is that the case is "borderline"; that is, becuase the correlati= on=20 is about 10-20% higher on the test database (since it was restored "clean"= =20 from backup) the planner is resorting to a seq scan. At which point the spectre of random_page_cost less than 1.0 rears its ugly= =20 head again. Because the planner seems to regard this as a borderline case,= =20 but it's far from borderline ... index scan takes 260ms, seq scan takes=20 244,000ms. Yet my random_page_cost is set pretty low already, at 1.5. It seems like I'd have to set random_page_cost to less than 1.0 to make sur= e=20 that the planner never used a seq scan. Which kinda defies the meaning of= =20 the setting. *sigh* wish the client would pay for an upgrade .... --=20 -Josh Berkus Aglio Database Solutions San Francisco