From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Ron Mayer" <ron(at)intervideo(dot)com> |
Cc: | josh(at)agliodbs(dot)com, "Achilleus Mantzios" <achill(at)matrix(dot)gatewaynet(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: [SQL] 7.3 analyze & vacuum analyze problem |
Date: | 2003-05-01 00:10:38 |
Message-ID: | 25282.1051747838@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance pgsql-sql |
"Ron Mayer" <ron(at)intervideo(dot)com> writes:
> Short summary: Later in the thread Tom explained my problem as free
> space not being evenly distributed across the table so ANALYZE's
> sampling gave skewed results. In my case, "pgstatuple" was a
> good tool for diagnosing the problem, "vacuum full" fixed my table
> and a much larger fsm_* would have probably prevented it.
Not sure if that is Achilleus' problem or not. IIRC, there should be
no difference at all in what VACUUM ANALYZE and ANALYZE put into
pg_statistic (modulo random sampling variations of course). The only
difference is that VACUUM ANALYZE puts an exact tuple count into
pg_class.reltuples (since the VACUUM part groveled over every tuple,
this info is available) whereas ANALYZE does not scan the entire table
and so has to put an estimate into pg_class.reltuples.
It would be interesting to see the pg_class and pg_stats rows for this
table after VACUUM ANALYZE and after ANALYZE --- but I suspect the main
difference will be the reltuples values.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-05-01 01:51:41 | Re: [SQL] 7.3 analyze & vacuum analyze problem |
Previous Message | Ron Mayer | 2003-04-30 22:16:58 | Re: [SQL] 7.3 analyze & vacuum analyze problem |
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-05-01 01:51:41 | Re: [SQL] 7.3 analyze & vacuum analyze problem |
Previous Message | Ron Mayer | 2003-04-30 22:16:58 | Re: [SQL] 7.3 analyze & vacuum analyze problem |