Re: Batch Insert Performance

From: Greg Stark <gsstark(at)mit(dot)edu>
To: "Peter Alberer" <h9351252(at)obelix(dot)wu-wien(dot)ac(dot)at>
Cc: "'Greg Stark'" <gsstark(at)mit(dot)edu>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Batch Insert Performance
Date: 2002-12-19 20:07:37
Message-ID: 87k7i53h86.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Johnson, Shaunn 2002-12-19 20:21:05 does version have large file support
Previous Message Ren Salomo 2002-12-19 19:31:38 Re: Returning multiple columns with a function??