From: | itb348(at)googlemail(dot)com |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: pdo emulate prepares not working. still getting parse-bind-execute-deallocate in pg log. |
Date: | 2011-08-26 10:42:03 |
Message-ID: | 4E57787B.7060909@googlemail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg범퍼카 토토SQL : Postg범퍼카 토토SQL 메일 링리스트 : 2011-08-26 이후 PGSQL-PHP 10:42 |
Am 26.08.2011 05:30, schrieb mark:
>
>
> Hi all,
>
>
> I am trying to convince some of our php guys to not use prepared statements.
>
>
> The reason for this is, first reasons is we are seeing no benefit IMO.
> performance wise nearly all of the statements are being prepared, executed
> and then deallocated in nearly all cases. The other times it's probably only
> run twice so it's still not a win.
>
> The second reason is I want to be able to use transaction pooling with
> pgbouncer. This is the primary driving force.
--snip--
Well, in my systems I make the best of the forced prepare and use
my own cache of prepared statements in PHP. Statistics show that
some statements are repeated a lot, which might give a benefit in
speed.
And I am especially against connection pooling because it can
give you untraceable errors and just makes your systems more complex.
But if you want it: my first test had success. Just add
$DBH->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
after creating the connection, do not touch the connection string.
/Str
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2011-09-13 23:39:32 | Re: pdo emulate prepares not working. still getting parse-bind-execute-deallocate in pg log |
Previous Message | mark | 2011-08-26 03:30:24 | pdo emulate prepares not working. still getting parse-bind-execute-deallocate in pg log. |