Postgres vacuum question (7.2)

Grant Shipley gshipley at gmail.com
Wed Mar 7 09:14:43 MST 2007


On 3/5/07, Jonathan Ellis <jonathan at carnageblender.com> wrote:
> That's the problem, this is way too low when you're deleting millions of
> records between vacuums.
>
> "vaccuum full verbose" will tell you what the minimum needs to be.  (a
> rule of thumb is, 100k for every GB of data.)

Thanks for that tip.  We are actually only deleting 75k rows in between vacuums.

> If you're really still on 7.2 (what is that, 6 years old?), maybe, but I
> doubt it.  certainly that's not the case in 8.x.  Indexes get vacuumed
> with the table that owns them.

My mistake, I believe we are actually on 7.4...... still very old.

>
> In any case you should definitely upgrade asap.  The planner
> improvements alone are worth it.

That is the plan but it will probably be another 6 months or longer
before we can switch our servers over.

> If that's really a normal use case (emptying out the whole table), use
> truncate instead of delete; you don't need to vacuum after truncate.

The normal use case is only 45-50k rows in the database.  One for each
logged in user to the our company website.


At any rate, thanks for all the help.  We did end up crashing over
night again because of this problem. :(

--
grant



More information about the PLUG mailing list