Re: Query Plan far worse in 7.3.2 than 7.2.1

From: SZŰCS Gábor <surrano(at)mailbox(dot)hu>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Query Plan far worse in 7.3.2 than 7.2.1
Date: 2003-04-30 11:00:40
Message-ID: 004401c30f07$c07f45e0$0a03a8c0@fejleszt2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-sql

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Wednesday, April 30, 2003 1:05 AM

> "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" <surrano(at)mailbox(dot)hu> 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 ------------------------------

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Manfred Koizar 2003-04-30 14:14:46 Re: More tablescanning fun
Previous Message Rajesh Kumar Mallah 2003-04-30 07:39:53 Re: Is 292 inserts/sec acceptable performance ?

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Darley 2003-04-30 14:39:24 Query Plan far worse in 7.3.2 than 7.2.1
Previous Message Richard Huxton 2003-04-30 09:26:51 Re: rules question