Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 09D969FB52D for ; Tue, 13 Mar 2007 10:25:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 69405-03 for ; Tue, 13 Mar 2007 10:24:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from globalrelay.com (mail1.globalrelay.com [204.92.49.200]) by postgresql.org (Postfix) with ESMTP id 7CCB59FB502 for ; Tue, 13 Mar 2007 10:24:40 -0300 (ADT) X-Virus-Scanned: Scanned by GRC-AntiVirus Gateway X-GR-Acctd: YES Received: from [63.226.156.118] (HELO DaveEMachine) by globalrelay.com (CommuniGate Pro SMTP 4.2.3) with ESMTP id 131930940; Tue, 13 Mar 2007 06:24:38 -0700 From: "Dave Dutcher" To: Cc: Subject: Re: Execution plan changed after upgrade from 7.3.9 to 8.2.3 Date: Tue, 13 Mar 2007 08:24:37 -0500 Message-ID: <010401c76572$f33d33a0$2e00a8c0@tridecap.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6822 thread-index: Acdla5dwXjN7yFJ7TvacX/XsfS9rBQABoy7g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Importance: Normal In-Reply-To: <45F698F4.8030601@leroymerlin.fr> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200703/219 X-Sequence-Number: 23624 > From: pgsql-performance-owner@postgresql.org > [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of > vincent.moreau@leroymerlin.fr > Subject: Re: [PERFORM] Execution plan changed after upgrade > from 7.3.9 to 8.2.3 > > The following did not change anything in the execution plan > > ALTER TABLE lm05_t_tarif_panneau ALTER COLUMN lrg_min SET > STATISTICS 1000 > ALTER TABLE lm05_t_tarif_panneau ALTER COLUMN lrg_max SET > STATISTICS 1000 > ANALYZE lm05_t_tarif_panneau > > I was able to improve response time by creating indexes, but I would > like to avoid changing the database structure because it is not > maintained by ourseleves, but by the third party vendor. I would actually try increasing the statistics on table lm05_t_couleur_panneau columns ht_min, ht_max, cod_aspect, and cod_gamme_panneau. Because I think the planner is thrown off because the sequential scan on lm05_t_couleur_panneau returns 280 rows when it expects 1. Maybe to start you could just SET default_statistics_target=1000, analyze everything, and see if that makes any difference. Dave