| From: | Fernando Nasser <fnasser(at)cygnus(dot)com> | 
|---|---|
| To: | pgsql-patches(at)postgresql(dot)org | 
| Subject: | ANALYZE command [REPOST] | 
| Date: | 2001-04-24 22:30:09 | 
| Message-ID: | 3AE5FE71.927768AC@cygnus.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-patches | 
[My apologies: I forgot to tell to which sources the patch applies, as required and, which is worse, I attached the wrong patch; I have corrected it now.]
This patch is a follow-up to the split of the vacuum and analyze (done by Bruce Momjian last year). I applies to today's CVS sources.
It adds a separate SQL extension command ANALYZE that will only perform the analyze part and thus only use shared locks.
I will submit the doc and test changes in a separate patch, if you decide that we are really going ahead with the ANALYZE command.
This version still does not update pg_class.  Those statistics are still tied in the vacuum part (num. of pages, tuples and indication if the relation has an index).  The patch allows for analyze_rel() to work differently if run as part of a VACUUM or as an standalone ANALYZE, so the missing bits can be added without changes to the current
behavior of VACUUM ANALYZE.
Possible future improvements:
1) Add the pg_class update to ANALYZE;
2) Add a VERBOSE option that prints information to gives the DBA a hint if it is worth of running VACUUM or not.
Thanks.
-- 
Fernando Nasser
Red Hat Inc.              E-Mail:  fnasser(at)redhat(dot)com
| Attachment | Content-Type | Size | 
|---|---|---|
| ANALYZE.PATCH | text/plain | 20.7 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2001-04-25 02:14:18 | Re: ANALYZE command [REPOST] | 
| Previous Message | Fernando Nasser | 2001-04-24 18:02:54 | ANALYZE command |