X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 68B18475458 for ; Wed, 30 Apr 2003 07:00:48 -0400 (EDT) Received: from mail.deltav.hu (mail.deltav.hu [213.163.0.192]) by postgresql.org (Postfix) with ESMTP id DC674474E42 for ; Wed, 30 Apr 2003 07:00:46 -0400 (EDT) Received: from fejleszt2 ([213.163.10.103]) by mail.deltav.hu (Netscape Messaging Server 3.6) with SMTP id AAA30CB for ; Wed, 30 Apr 2003 13:00:46 +0200 Message-ID: <004401c30f07$c07f45e0$0a03a8c0@fejleszt2> From: "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" To: References: <00db01c30e54$1ab272d0$0a03a8c0@fejleszt2> <26550.1051627993@sss.pgh.pa.us> <011101c30e68$f056bdb0$0a03a8c0@fejleszt2> <18324.1051657553@sss.pgh.pa.us> Subject: Re: Query Plan far worse in 7.3.2 than 7.2.1 Date: Wed, 30 Apr 2003 13:00:40 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-19.1 required=5.0 tests=BAYES_20,ORIGINAL_MESSAGE,QUOTED_EMAIL_TEXT,REFERENCES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/256 X-Sequence-Number: 1762 ----- Original Message ----- From: "Tom Lane" Sent: Wednesday, April 30, 2003 1:05 AM > "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" writes: > > ---------------------------- 7.2.1 PLAN --------------------------------- > > -> Seq Scan on valuta (cost=0.00..1.06 rows=6 width=4) (actual time=0.02..0.11 rows=6 loops=2) > > > > ---------------------------- 7.3.2 PLAN --------------------------------- > > -> Seq Scan on valuta (cost=0.00..20.00 rows=1000 width=4) (actual time=0.02..0.06 rows=6 loops=2) > > Ah, there's the problem. You never vacuumed or analyzed "valuta", so > the 7.3 planner didn't know it had only six rows, and chose a plan that > was more appropriate for a larger table. The thousand-row estimate is > the tipoff, because that's the default assumption when there are no > stats. > > regards, tom lane Thanks! VACUUM ANALYZE really worked and I learned something new. The strange part is, that I think I issued a "VACUUM ANALYZE;" (that should do all the tables, right?) a couple of weeks before because of another problem (it didn't help that time, tho) G. -- while (!asleep()) sheep++; ---------------------------- cut here ------------------------------