>
> If you use a 'prepared' insert within a transaction, would that speed
things
> up - maybe by defering index updates?
>
I doubt it.
From: Neil Conway <neilc@samurai.com>
... I'd suspect that for most INSERT queries, the
parsing/rewriting/planning stages are relatively inexpensive, and the
bulk of the runtime is spent in the executor (and writing WAL records,
etc). So my guess would be that you won't see that much of a performance
improvement from this...
I've noticed a real performance boost using COPY
something like ...
PQexec("COPY xxx FROM stdin");
for (...)
{ sprintf(buf, "%d\t%d\t...\n", values[0], values[1], ... values[n]); PQputline(conn, buf);
}
PQputline(conn, "\\.\n");
PQendcopy(conn);
runs like hell.
Regards, Christoph