See here for more details:
http://www.postgresql.org/docs/8.0/static/maintenance.html
In short, you don't need to do a vacuum analyze for each connection--it is a database-specific or table-specific task, not a connection-specific one. You can use vacuum analyze when you think things have changed enough in one or all tables to justify its use. What justifies enough change is a bit of an open question, although I think a rough number is if a table changes by about 15%, it then needs a vacuum analyze. In practice, you can just use cron (see man cron on a unix-like system) to set up a vacuum for nightly, weekly, or something like that.
Sean
On May 19, 2005, at 6:20 AM, Surabhi Ahuja wrote:
Analyze command helps increase performance.
Suppose i have n connections to the database..and each connection i query. So does this mean that i need to do an analyse over each of those connections.
Cant analyze be done one time...
and also please tell if there is any way in postgresql to tell it to perform analyze periodically after some time gap.
Thank You Surabhi
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org