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

From: sunpeng <bluevaley(at)gmail(dot)com>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: are there any methods to disable updating index before inserting large number tuples?
Date: 2011-11-22 15:47:15
Message-ID: CAOYKhLrpS0zZJcP_J_a8A-oSZnC5BX0krS42UzJoc+pgGkSSzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi, friends,
Now each hour I want to insert about 20 millions tuples into table A,
which has a btree index.
How to disable index update before inserting those 20 millions tuples,
and then enable it after those tuples having being inserted? Just as the
followings:
>disable index update
>insert into A ....//here will insert 20 millions tuples
> enable index update

The purpose is to improve the performance.
Thanks!
peng

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2011-11-22 15:52:07 Re: are there any methods to disable updating index before inserting large number tuples?
Previous Message Scott Marlowe 2011-11-22 15:21:48 Re: Is this safe to perform on PostgreSQL 8.3.7 -> Resize a column in a PostgreSQL table without changing data