Re: analyze at startup? - Mailing list pgsql-general

From Sean Davis
Subject Re: analyze at startup?
Date
Msg-id e2a125204b1b96f406a73f2c266f6680@mail.nih.gov
Whole thread Raw
In response to analyze at startup?  ("Surabhi Ahuja " <surabhi.ahuja@iiitb.ac.in>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: analyze at startup?
Next
From: Michael Glaesemann
Date:
Subject: Re: 8.0.3 build error on Mac OS X 10.4