On Thu, 19 Sep 2002, Kris Jurka wrote:
>
> On Thu, 19 Sep 2002, Tom Lane wrote:
>
> > Kris Jurka <[EMAIL PROTECTED]> writes:
> > > While adding schema support to the JDBC Driver, I came across a query
> > > which occasionally generates some spectacularly bad plans.
> >
> > Hm, does an ANALYZE help?
> >
>
> Yes, it does, but I don't understand why.  The query is entirely against
> pg_catalog tables which have had all of three tables added to them.  How
> can the new ANALYZE stats be significantly different than what came from
> the ANALYZED template1.
>
> Kris Jurka
>

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?

Kris Jurka


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to