Re: Anyone have example C code for Asynchronous Command Processing? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Anyone have example C code for Asynchronous Command Processing?
Date
Msg-id 25080.1078844757@sss.pgh.pa.us
Whole thread Raw
In response to Re: Anyone have example C code for Asynchronous Command Processing?  ("Tony and Bryn Reina" <reina_ga@hotmail.com>)
List pgsql-novice
"Tony and Bryn Reina" <reina_ga@hotmail.com> writes:
> Would the 2 connections execute
> faster than running the 2 commands serial over the same connection?

Perhaps, but you'd get much more win out of batching multiple inserts
into one COPY.  The overhead of parsing an INSERT command is relatively
high compared to what it actually gets done.  Running two in parallel
does nothing to improve the overhead situation; and if you are after
speed, cutting the overhead is where you *must* focus your attention.
(If you just gotta have the sex appeal of parallelism, try running two
COPY operations in parallel...)

            regards, tom lane

pgsql-novice by date:

Previous
From: Mohan
Date:
Subject: Re: JDBC driver & local server
Next
From: "Tony and Bryn Reina"
Date:
Subject: Re: Anyone have example C code for Asynchronous Command Processing?