Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 05B2F475BF9 for ; Sat, 25 Jan 2003 14:19:11 -0500 (EST) Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242]) by postgresql.org (Postfix) with ESMTP id 1D9F3475AD4 for ; Sat, 25 Jan 2003 14:19:10 -0500 (EST) Received: from [192.168.1.1] ([68.11.66.83]) by lakemtao03.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030125191911.QNEL8666.lakemtao03.cox.net@[192.168.1.1]> for ; Sat, 25 Jan 2003 14:19:11 -0500 Subject: Re: LOCK TABLE & speeding up mass data loads From: Ron Johnson To: PgSQL Performance ML In-Reply-To: <1043521665.58142.135.camel@jester> References: <1043521053.818.32.camel@haggis> <1043521665.58142.135.camel@jester> Content-Type: text/plain Organization: Message-Id: <1043522349.818.36.camel@haggis> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 25 Jan 2003 13:19:09 -0600 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/333 X-Sequence-Number: 980 On Sat, 2003-01-25 at 13:07, Rod Taylor wrote: > On Sat, 2003-01-25 at 13:57, Ron Johnson wrote: > > Hi, > > > > Would LOCK TABLE ACCESS EXCLUSIVE MODE speed things up, when I have > > a script that loads data by setting transactions, and then committing > > works after every few thousand INSERTs? > > If you're the only person working on the database, then no. If you're > fighting for resources with a bunch of other people -- then possibly, > but the others won't get anything done during this timeframe (of > course). Ok. > Oh, and you're using COPY right? No. Too much data manipulation to do 1st. Also, by committing every X thousand rows, then if the process must be aborted, then there's no huge rollback, and the script can then skip to the last comitted row and pick up from there. -- +---------------------------------------------------------------+ | Ron Johnson, Jr. mailto:ron.l.johnson@cox.net | | Jefferson, LA USA http://members.cox.net/ron.l.johnson | | | | "Fear the Penguin!!" | +---------------------------------------------------------------+