Yikes! I was hoping that by not having to wait for an acknowledgement that
the data had been successfully dumped I could speed up the inserts. I guess
I'll have to try to modify things to use COPY.
Just for kicks... you said that you can't have multiple connections pendings
over a single connection. Would there be any advantage for the same client
to make multiple connections in this case? For example, if I had 2 INSERT
queries ready to send, could I send them along 2 different connections
(PQconn conn1, conn2) from the same C code? Would the 2 connections execute
faster than running the 2 commands serial over the same connection?
----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tony Reina" <reina_ga(at)hotmail(dot)com>
Sent: Monday, March 08, 2004 4:51 PM
Subject: Re: [NOVICE] Anyone have example C code for Asynchronous Command
> reina_ga(at)hotmail(dot)com (Tony Reina) writes:
> > I'm using libpq to dump some text files into a PostgreSQL database.
> > It's just a bunch of "INSERT INTO" calls, but they block one another
> > waiting for the INSERT command to return. I think I can speed things
> > up by using asynchronous command processing (e.g. PQsendQuery,
> > PQgetResult).
> No you can't, because you can't have multiple commands pending over a
> single connection.
> You would get significantly more speedup by using COPY, anyway.
> regards, tom lane
In response to
pgsql-novice by date
|Next:||From: daq||Date: 2004-03-09 12:14:24|
|Subject: Re: Getting Column Information from a Table with psql|
|Previous:||From: stm23||Date: 2004-03-09 06:14:15|
|Subject: JDBC driver & local server|