pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Sawtell <csawtell@xtra.co.nz>
To: gav <gav@nlr.ru>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] how many inserts in one transaction?
Date: Sun, 23 Jan 2000 20:21:45 +1300
Message-ID: <00012320272700.20291@berty> (raw)
References: <1611.000123@nlr.ru>

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. <<<----




view thread (2+ messages)

Message-ID: <00012320272700.20291@berty>
Permalink:  ../00012320272700.20291@berty/
Also on:    postgresql.org/message-id/00012320272700.20291@berty

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: csawtell@xtra.co.nz, gav@nlr.ru
  Subject: Re: [SQL] how many inserts in one transaction?
  In-Reply-To: <00012320272700.20291@berty>
  References: <1611.000123@nlr.ru> <00012320272700.20291@berty>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox