postponing index updates in a transaction

Started by Jean-Christian Imbeaultover 23 years ago2 messagesgeneral
Jump to latest
#1Jean-Christian Imbeault
jc@mega-bucks.co.jp

To speed up the inserting of many rows, is there a way to turn off any
index update being done while inside a transaction and have the index be
update at COMMIT?

Something similar to the "initially deferred" constraint.

Thanks,

Jc

#2Bret Hughes
bhughes@elevating.com
In reply to: Jean-Christian Imbeault (#1)
Re: postponing index updates in a transaction

On Wed, 2002-12-11 at 03:27, Jean-Christian Imbeault wrote:

To speed up the inserting of many rows, is there a way to turn off any
index update being done while inside a transaction and have the index be
update at COMMIT?

Something similar to the "initially deferred" constraint.

Thanks,

Jc

I don't think so.

The docs refer to this issue and suggest dropping the index, doing the
updates and then recreating the index. using copy from is way faster
than individual inserts too.

Bret