Re: R駱. - Mailing list pgsql-novice

From Stuart Woodward
Subject Re: R駱.
Date
Msg-id 20030910182620.F755.WOODWARD@garage.co.jp
Whole thread Raw
In response to Rép. : How to opimize the insertion of data  ("Erwan DUROSELLE" <EDuroselle@seafrance.fr>)
List pgsql-novice
On Wed, 10 Sep 2003 09:50:02 +0200
"Erwan DUROSELLE" <EDuroselle@seafrance.fr> wrote:

> This is much faster (x17 in my simple test) than without the begin/end,
> which will result in 1 transaction per insert.

I have to agree that is is the way to go. One of my colleagues went as
far as writing a Perl script that inserted the transaction code around X
number of operations. (Sorry I don't have that script now.)

What I would like to know is, how can you determine the optimum number
of lines to surround with a transaction? I guess at some point Postgres
will run out of memory or disk space if too many operations are done
within a single transaction.

It would be nice to have a rule of thumb to calculate roughly how many
operations to group together but I guess that this is almost impossible
to calculate.

Also, the bigger the dump the harder it is to edit by hand so you may
need to develop a script to do this at some point.


pgsql-novice by date:

Previous
From: "Erwan DUROSELLE"
Date:
Subject: Rép. : How to opimize the insertion of data
Next
From: Aarni Ruuhimäki
Date:
Subject: Re: