FAQ
It seems that at least when using bind_param, DBD::Pg performs three
server round-trips for every execution of a prepared statement
(PREPARE, EXECUTE, DEALLOCATE). This has been observed with DBD::Pg
2.17.1 (plus the BYTEA patch from r414471) against a PostgreSQL 9.0.1
server.

Is this really necessary? Is there a way to avoid this, without
disabling server-side prepared statements altogether?

--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

Search Discussions

  • David E. Wheeler at Dec 3, 2010 at 6:46 pm

    On Dec 3, 2010, at 10:35 AM, Florian Weimer wrote:

    It seems that at least when using bind_param, DBD::Pg performs three
    server round-trips for every execution of a prepared statement
    (PREPARE, EXECUTE, DEALLOCATE). This has been observed with DBD::Pg
    2.17.1 (plus the BYTEA patch from r414471) against a PostgreSQL 9.0.1
    server.

    Is this really necessary? Is there a way to avoid this, without
    disabling server-side prepared statements altogether?
    If you use prepare_cached(), it should only do the PREPARE on the first call, and EXECUTE only on subsequent calls. Not sure when it does the DEALLOCATE though; maybe it doesn't?

    David
  • Greg Sabino Mullane at Dec 4, 2010 at 3:03 am

    It seems that at least when using bind_param, DBD::Pg performs three
    server round-trips for every execution of a prepared statement
    (PREPARE, EXECUTE, DEALLOCATE). This has been observed with DBD::Pg
    2.17.1 (plus the BYTEA patch from r414471) against a PostgreSQL 9.0.1
    server.
    I cannot duplicate this - can you provide a test script?

    - --
    Greg Sabino Mullane greg@turnstep.com
    End Point Corporation http://www.endpoint.com/
    PGP Key: 0x14964AC8 201012032158
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbd-pg @
categoriesperl
postedDec 3, '10 at 6:35p
activeDec 4, '10 at 3:03a
posts3
users3
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase