Re: Running analysis as part of a stored proc
| От | Tom Lane | 
|---|---|
| Тема | Re: Running analysis as part of a stored proc | 
| Дата | |
| Msg-id | 20115.1343505658@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Running analysis as part of a stored proc (Ioannis Anagnostopoulos <ioannis@anatec.com>) | 
| Ответы | 
                	
            		Re: Running analysis as part of a stored proc
            		
            		 | 
		
| Список | pgsql-novice | 
Ioannis Anagnostopoulos <ioannis@anatec.com> writes:
> Is it advisable to include a VACUUM ANALYZE <table name> within a stored
> procedure that runs as part of a batch every night?
If you're envisioning this as cleanup after the day's activities,
autovacuum will almost certainly make that unnecessary.
The typical cases where you need a manual vacuum or analyze in a stored
proc are where you need the cleanup or new stats immediately and can't
wait for autovacuum to get around to it.  So if this is a step in a
process where you just modified the table heavily and you need the
cleanup done before you get to the next step, then yes it'd make sense.
            regards, tom lane
		
	В списке pgsql-novice по дате отправления: