If the "INSERT INTO" calls are known previously, you can spawn several
connections at the same time.
It's argueable that it will finish sooner, but it may be worth trying.
> reina_ga@hotmail.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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org