Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 588D9632F04 for ; Mon, 22 Mar 2010 20:07:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 53514-06 for ; Mon, 22 Mar 2010 23:07:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id EB91F63241A for ; Mon, 22 Mar 2010 20:07:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o2MN7Z4f016223; Mon, 22 Mar 2010 19:07:35 -0400 (EDT) To: "Dai, Tino" cc: "pgsql-admin@postgresql.org" Subject: Re: Disparity between 8.1.18 and 8.2.14 performance wise In-reply-to: <1CA7FF980DA3824F9A5C31532B7A40DCC4B87E10@LCXCLMB01.LCDS.LOC.GOV> References: <1CA7FF980DA3824F9A5C31532B7A40DCC4B87E10@LCXCLMB01.LCDS.LOC.GOV> Comments: In-reply-to "Dai, Tino" message dated "Mon, 22 Mar 2010 17:58:41 -0400" Date: Mon, 22 Mar 2010 19:07:35 -0400 Message-ID: <16222.1269299255@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.462 tagged_above=-10 required=5 tests=AWL=0.137, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/160 X-Sequence-Number: 33959 "Dai, Tino" writes: > After many days of googling and referring to different web pages about performance, I'm > turning to this list for help. We have a third party application that is running on 8.1.11 and the > vendor has told us not to upgrade the database to 8.2. 8.2 was released in 2006. 8.1 is going to be desupported entirely at the end of 2010. You really need to be holding your vendor's feet to the fire about supporting modern versions of Postgres, rather than looking for workarounds. But having said that, I think 8.1 might generate a reasonable plan if it weren't getting misled by these useless constraints: > -> Seq Scan on role_setting (cost=0.00..964.50 rows=1 width=70) (actual time=0.036..121.443 rows=43833 loops=1) > Filter: (((section)::text = (section)::text) AND (ref_id = ref_id)) Can you get rid of those? regards, tom lane