Rép. : How to opimize the insertion of data - Mailing list pgsql-novice

From Erwan DUROSELLE
Subject Rép. : How to opimize the insertion of data
Date
Msg-id 0527fc458c4fd66d48d0b52cb6c683f13f5ed6ce@
Whole thread Raw
Responses Re: R駱.
List pgsql-novice
Did you batch your inserts in a single transaction?, ie:
BEGIN
insert ...;
insert ...;
...
Commit

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

Erwan


>>> Juan Francisco Diaz <j-diaz@publicar.com> 09/09/2003 23:05:54 >>>
Hi,  have tried by all means to optimize the insertion of data in my db
but
it has been impossible.
Righto now to insert around 300 thou records it takes soemthing like 50
to
65 minutes (too  long).
Im using a Mac powerpc g4 533Mhz with 256 RAM.
I would relly appreciate that the insertion process is done in like 30
or 35
minutes TOPS. So far it is impossible.
My db right now has no FK, no indexes, the insertions is being done in
batch
(19 thou records).
Is it possible with my current machine to achieve the level of
performance
i've metioned?
Any help would be greatly appreciated, by the way the same insertion
takes
25 mins in ms sqlserver2000 in a p3 1.4ghz 1gig ram.
Thanks

JuanF


---------------------------(end of
broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

pgsql-novice by date:

Previous
From: Alberto Caso
Date:
Subject: Re: How to opimize the insertion of data
Next
From: Stuart Woodward
Date:
Subject: Re: R駱.