pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: SZŰCS Gábor <surrano@mailbox.hu>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query Plan far worse in 7.3.2 than 7.2.1
Date: Tue, 29 Apr 2003 19:05:53 -0400
Message-ID: <18324.1051657553@sss.pgh.pa.us> (raw)
In-Reply-To: <011101c30e68$f056bdb0$0a03a8c0@fejleszt2>
References: <00db01c30e54$1ab272d0$0a03a8c0@fejleszt2>
	<26550.1051627993@sss.pgh.pa.us>
	<011101c30e68$f056bdb0$0a03a8c0@fejleszt2>

"=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" <surrano@mailbox.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




view thread (8+ messages)  latest in thread

Message-ID: <18324.1051657553@sss.pgh.pa.us>
Permalink:  ../18324.1051657553@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18324.1051657553@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, surrano@mailbox.hu, pgsql-performance@postgresql.org
  Subject: Re: Query Plan far worse in 7.3.2 than 7.2.1
  In-Reply-To: <18324.1051657553@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox