Re: vacuum performance on insert

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Sean Chen" <zyschen(at)gmail(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: vacuum performance on insert
Date: 2010-08-05 17:56:52
Message-ID: 4C5AB5140200002500034276@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Sean Chen <zyschen(at)gmail(dot)com> wrote:

> 1, delete records ...
> 2, insert records ...
>
> if I add "vacuum analyze" in-between this two steps, will it help
> on the performance on the insert?

Assuming there are no long-running transactions which would still be
able to see the deleted rows, a VACUUM between those statements
would allow the INSERT to re-use the space previously occupied by
the deleted rows, rather than possibly needing to allocate new space
from the OS.

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2010-08-05 18:11:08 Re: vacuum performance on insert
Previous Message Sean Chen 2010-08-05 17:49:54 vacuum performance on insert