Re: Optimizer generates bad plans.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimizer generates bad plans.
Date: 2002-09-20 19:50:37
Message-ID: 28067.1032551437@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kris Jurka <books(at)ejurka(dot)com> writes:
> Looking at the differences in statistics before and after the ANALYZE the
> only differences are in correlation. This comes from initdb around line
> 1046...

> "$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <<EOF
> ANALYZE;
> VACUUM FULL FREEZE;
> EOF

> Could this be done better in the one step VACUUM FULL FREEZE ANALYZE or
> ANALYZING after the VACUUM FULL?

Hm. We can't do it like that, because that would leave the pg_statistic
rows unfrozen. I suppose we could do

VACUUM FULL;
ANALYZE;
VACUUM FREEZE;

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2002-09-20 19:54:45 Re: Monitoring a Query
Previous Message Michael Meskes 2002-09-20 19:26:01 [s.hetze@linux-ag.de: PostgreSQL integration Visual Basic, SQLProcedureColumns]