Home > Archive > PostgreSQL Administration > January 2006 > Vacuum is needed or not?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Vacuum is needed or not?
Szabolcs BALLA

2006-01-12, 3:24 am

Hi,

How do I know vacuum is need or not? I mean, are there any query to know
status of statistics, tables, indexes, etc?
(7.4.7)
Our database size bigger than just go and do it. :(

Thanks
Szabek

Jaime Casanova

2006-01-13, 3:23 am

On 1/5/06, Szabolcs BALLA <szabolcs.balla@confinsystems.com> wrote:
> Hi,
>
> How do I know vacuum is need or not? I mean, are there any query to know
> status of statistics, tables, indexes, etc?


at least, once every billion transactions to be safe...

> (7.4.7)
> Our database size bigger than just go and do it. :(
>


ahh... then execute it once a week or once a day, for avoid excessive growing...

> Thanks
> Szabek
>
>



--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Jim C. Nasby

2006-01-13, 1:23 pm

On Thu, Jan 12, 2006 at 11:21:19PM -0500, Jaime Casanova wrote:
> On 1/5/06, Szabolcs BALLA <szabolcs.balla@confinsystems.com> wrote:
>
> at least, once every billion transactions to be safe...
>
>
> ahh... then execute it once a week or once a day, for avoid excessive growing...


Even once a day can be awefully conservative for many databases. Keep in
mind that every single row that is updated or deleted will hang around
in the database until you vacuum; on a busy system that can result in a
lot of wasted space. And once the bloat is there, it can be hard to get
rid of.

7.4.7 has contrib/pg_autovacuum, and I highly recommend it. Also,
http://lnk.nu/pervasive-postgres.com/7m4.asp and
http://lnk.nu/pervasive-postgres.com/7jd.asp might be interesting reads
for you.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com