Re: are there any methods to disable updating index before inserting large number tuples?

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: are there any methods to disable updating index before inserting large number tuples?
Date: 2011-11-22 15:52:07
Message-ID: 20111122155206.GF7661@shinkuro.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 22, 2011 at 11:47:15PM +0800, sunpeng wrote:
> >disable index update
> >insert into A ....//here will insert 20 millions tuples
> > enable index update
>

BEGIN;
DROP INDEX;
INSERT INTO A;
CREATE INDEX;

But I think performance on that table is going to be pretty bad. I
suspect that COPY is going to be your friend here.

A

--
Andrew Sullivan
ajs(at)crankycanuck(dot)ca

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregg Jaskiewicz 2011-11-22 15:55:27 Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data
Previous Message sunpeng 2011-11-22 15:47:15 are there any methods to disable updating index before inserting large number tuples?