From: | Clemens Eisserer <linuxhippy(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Howto use "COPY FROM" with the native API? |
Date: | 2011-04-11 15:21:16 |
Message-ID: | BANLkTimXyVdvncwJJzxeFqrYSq6obYPO6w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
We are working on an university project for network traffic accounting.
We use ulogd-2 to log netfilter packets, however it creates for each
packet a seperate transaction and also doesn't use prepared
statements, which results in horrible performance.
What we are looking for is a low-overhead way of inserting many rows
(100-1000) into a table at once in one transaction.
Is "COPY FROM STDIN" a good idea in this case?
If so, are there some examples how to use "COPY FROM STDIN" with the
native C API?
I found some documentation, however as I am no C native some sample
code would really help.
Thank you in advance, Clemens
PS: Sorry for the cross post, I accidentially sent it to the jdbc list before.
From | Date | Subject | |
---|---|---|---|
Next Message | manuel antonio ochoa | 2011-04-11 15:23:36 | PG 9.0 32 bits bin under 64 bit arq |
Previous Message | George Woodring | 2011-04-11 15:07:20 | Re: autovacuum issue after upgrade to 9.0.1 |