Re: Alternative to drop index, load data, recreate index?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: "Jason L(dot) Buberel" <jason(at)buberel(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Alternative to drop index, load data, recreate index?
Date: 2007-09-11 01:45:30
Message-ID: 8783.1189475130@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Mon, 2007-09-10 at 17:06 -0700, Jason L. Buberel wrote:
>> However, I now have tables so large that even the 'recreate all
>> indices' step is taking too long (15-20 minutes on 8.2.4).

> If you create the indexes with CONCURRENTLY, then you can write to the
> tables while the indexes are being created. That might help reduce your
> downtime window.

Also, I trust you've experimented to find the optimal
maintenance_work_mem for this task on your machine? It's probably
more on 8.2.x than it was before, since we improved the sort code...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dan99 2007-09-11 01:50:31 plpgsql trigger original query
Previous Message Stephen Frost 2007-09-11 01:04:31 Re: Debian problem...