Re: Batch Insert Performance - Mailing list pgsql-general

From Greg Stark
Subject Re: Batch Insert Performance
Date
Msg-id 87k7i53h86.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Batch Insert Performance  ("Peter Alberer" <h9351252@obelix.wu-wien.ac.at>)
List pgsql-general
Ok, a weird thing happened. I gave up on the batch insert, went to a friend's
house to drink some scotch, came back and tried it again and the whole insert
took 5 minutes. That's _much_ more reasonable.

Now it was late at night and I wasn't necessarily completely sober but I'm
pretty sure _nothing_ had changed. I can only imagine somehow the query was
frozen trying to grab a lock on something. Only nothing else was running and
it was consuming an awful lot of cpu for something trying to acquire a lock.

For what it's worth I tried it with the constraints removed using alter table.
It took 10 seconds to do the entire insert, then a 1m15s to restore each
constraint. (Can I restore them together? would it be faster?) So that's
faster but only by a factor of 2.

--
greg

pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: Returning multiple columns with a function??
Next
From: "Johnson, Shaunn"
Date:
Subject: does version have large file support