Re: Change Request: Make PDO default to not emulate prepared statements for MySQL
| From: | Johannes Schlüter | Date: | Sun, 01 May 2011 07:32:29 +0000 |
| Subject: | Re: Change Request: Make PDO default to not emulate prepared statements for MySQL | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52127@lists.php.net to get a copy of this message | ||
Hi,
On Apr 30, 2011, at 17:13, Anthony Ferrara <ircmaxell@gmail.com> wrote:
> I have already reported this issue on the bug tracker:
> http://bugs.php.net/bug.php?id=54638
Besides the question about query cache and security there is a bit more to keep in mind:
Using native prepared statements means one more round-trip between PHP and MySQL which might impact
performance. This is even more relevant as PDO::query will go through the PS API ... While PS uses a
more compact binary protocol.
Also there are still a few (minor) statements which can't be prepared in MySQL where PDO will
silently fall back silently to emulation. (don't have the list at hand, but should be in the
docs)
Also mind that native PS still runs through PDO's SQL parser to handle place holder so it
won't solve all issues in there.
johannes