From: | "Andy Pearce" <andyj(at)basesys(dot)co(dot)uk> |
---|---|
To: | "Erwan DUROSELLE" <EDuroselle(at)seafrance(dot)fr>, "pgsql-novice" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Rép. : [NOVICE] Performance |
Date: | 2002-11-09 00:16:27 |
Message-ID: | 001401c28785$40463be0$8ac8fea9@dellboy |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi,
The program is running a 'copy from stdin' type query so it is one
transaction. I'm running linux on a 2.4 kernel. The table does have a
trigger, fired on inserts. I'm going to take the trigger out and I'll see
what happens.
Thanks for your help
Andy
----- Original Message -----
From: "Erwan DUROSELLE" <EDuroselle(at)seafrance(dot)fr>
To: <andyj(at)basesys(dot)co(dot)uk>; <pgsql-novice(at)postgresql(dot)org>
Sent: Friday, November 08, 2002 9:59 AM
Subject: Rép. : [NOVICE] Performance
> 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(at)basesys(dot)co(dot)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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Rodrigues | 2002-11-10 05:49:56 | Re: Display a function |
Previous Message | Malcolm Hutty | 2002-11-08 17:56:33 | Efficiency of stored procedure vs large join |