Surabhi Ahuja wrote:
> Analyze command helps increase performance.
More exactly, it updates statistics so the planner knows that (e.g.) you
have lots of different values in the invoice_date column.
> 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.
No. You only need to analyse if your data changes greatly.
> 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.
Haven't used the autovacuum add-on myself, but probably worth looking at it.
--
Richard Huxton
Archonet Ltd