Thread: VACUM database

VACUM database

From
Uro Gruber
Date:
Hi!

I wan't to know how often do i have to do this. If i do a lot of
inserts, my SELECTS are very slow, but if I Vacum the table it's
better. do i have to vacum every insert?

Thanks.

--
Uroš Gruber



Re: VACUM database

From
"Steve Wolfe"
Date:
> I wan't to know how often do i have to do this. If i do a lot of
> inserts, my SELECTS are very slow, but if I Vacum the table it's
> better. do i have to vacum every insert?

      Not after every insert, but it should at least be done nightly and
after a large batch of inserts.  And make sure that you do 'vacuum analyze',
or alternatively, from the nightly postgres super-user cron,
'vacuumdb --all --analyze'.

steve