[Haskell-cafe] [database-devel] Announcing postgresql-libpq-0.8.2.3
joeyadams3.14159 at gmail.com
Tue Jul 9 04:00:51 CEST 2013
On Mon, Jul 8, 2013 at 9:03 PM, Leon Smith <leon.p.smith at gmail.com> wrote:
> I just fixed a fairly serious performance problem with postgresql-libpq's
> binding to PQescapeStringConn; in was exhibiting a non-linear slowdown
> when more strings are escaped and retained.
I'd like to point out a somewhat related bottleneck in postgresql-simple
(but not postgresql-libpq). Every PQescapeStringConn or PQescapeByteaConn
call involves a withMVar, which is about 100ns on the threaded RTS on my
system. Taking the Connection lock once for the whole buildQuery call
might be much faster, especially for multi-row inserts and updates.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe