Rép. : Performance - Mailing list pgsql-novice

From Erwan DUROSELLE
Subject Rép. : Performance
Date
Msg-id 48a44818852be395353de7b38dc650b23dcb8efd@
Whole thread Raw
List pgsql-novice
No, it should be a few seconds.

Could you provide more details? OS, language, is it a single
transaction or not, table description, even maybe your program?

The transaction thing is the most important: if you have

insert ...;
insert ...;
insert ...;

then it is 1 transaction for each insert statement, which is slow.

But if you :
begin transaction
insert ...;
insert ...;
insert ...;
commit;

It should be MUCH faster .

Erwan

>>> "Andy Pearce" <andyj@basesys.co.uk> 11/08 10:47  >>>
Hi,

I have a postgresql 7.2.1 db running on a Pentium Pro server with 160mb
ram and scsi drive. I tried to perform a copy to load about 7000
records, using a c program I'd written and it takes about 20 minutes to
complete. each record has 5 field and the total size of each record is
about 56 characters.

Does 20 minutes sound about right for such an action?

Thanks for your help

Andy

pgsql-novice by date:

Previous
From: "Andy Pearce"
Date:
Subject: Performance
Next
From: Andrew McMillan
Date:
Subject: Re: Where is the saved database?