Re: Postgresql optimisation

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgresql optimisation
Date: 2009-10-28 16:36:52
Message-ID: alpine.DEB.2.00.0910281634330.19472@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 28 Oct 2009, Dave Dutcher wrote:
> Also if you switch to truncate then you should ANALYSE the tables after you
> finish inserting. Note that VACUUM ANALYSE is not necessary after a
> truncate/insert because there should be no dead tuples to vacuum.

Perhaps reading the other replies in the thread before replying yourself
might be advisable, because this previous reply directly contradicts you:

On Wed, 28 Oct 2009, Kevin Grittner wrote:
> I recommend VACUUM ANALYZE of the table(s) after this step. Without
> that, the first query to read each tuple sets its hint bits and
> rewrites it, causing a surprising delay at unpredictable times
> (although heavier near the start of the day).

There *is* a benefit of running VACUUM ANALYSE rather than just ANALYSE.

Matthew

--
I suppose some of you have done a Continuous Maths course. Yes? Continuous
Maths? <menacing stares from audience> Whoah, it was like that, was it!
-- Computer Science Lecturer

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Dave Dutcher 2009-10-28 17:23:18 Re: Postgresql optimisation
Previous Message Dave Dutcher 2009-10-28 16:30:39 Re: Postgresql optimisation