Received: from mta3-rme.xtra.co.nz (mta3-rme.xtra.co.nz [203.96.92.13]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA30010 for ; Sun, 23 Jan 2000 02:24:56 -0500 (EST) (envelope-from csawtell@xtra.co.nz) Received: from berty ([210.55.121.38]) by mta3-rme.xtra.co.nz (InterMail v4.01.01.00 201-229-111) with SMTP id <20000123072419.NZLT3144.mta3-rme@berty>; Sun, 23 Jan 2000 20:24:19 +1300 From: Christopher Sawtell To: gav Subject: Re: [SQL] how many inserts in one transaction? Date: Sun, 23 Jan 2000 20:21:45 +1300 X-Mailer: KMail [version 1.0.17] Content-Type: text/plain References: <1611.000123@nlr.ru> Cc: pgsql-sql@postgreSQL.org MIME-Version: 1.0 Message-Id: <00012320272700.20291@berty> Content-Transfer-Encoding: 8bit X-KMail-Mark: On Sun, 23 Jan 2000, you wrote: > Hi, > > I have a database created in postgres 6.5.3 and need insert huge > number (~10-100 thousands) of > rows in one of tables. To do that quickly I put this part of work in > transaction. My question is such: should I split this block of > insertings into many transaction to raise the speed? And > exists the limit of INSERT-commands that I can do in one transaction? Do not forget that you can use COPY to create a table in PostgreSQL. It copies from a delimited operating system text file to a PostgreSQL table. Someting like this:- CREATE TABLE district ( number serial, name varchar(25)); copy district from '/home/chris/iopen/schools/database/districts.txt' USING DELIMITERS '~'; -- Sincerely etc., NAME Christopher Sawtell - Support Engineer - iOpen Technologies Ltd. CELL PHONE 021 257 4451 ICQ UIN 45863470 EMAIL chris @ iopen . co . nz, csawtell @ xtra . co . nz CNOTES ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz ---->>> Please refrain from using HTML attachments in e-mails to me. <<<----