Hi all Resuming this once again after Anthony's blog post...
On 16/10/2014 18:10, Ferenc Kovacs wrote: > On Thu, Oct 16, 2014 at 5:47 PM, Rasmus Lerdorf <ras...@lerdorf.com> wrote: >> I do agree that the default should probably be server-side since it is >> the least surprising. We just need to make it very very clear in the >> upgrade doc that this change will likely slow down peoples' apps and >> show them how to turn client-side prepares back on. >> >> -Rasmus >> > > I don't think we should remove the option, just change the defaults, and > most people would be fine switching back to the emulation, but it should be > their conscious decision imo. Yes. For the record, pdo_pgsql and pdo_mysql seem to be the only PDO drivers that can effectively emulate prepares. As far as I could tell, the others ignore the attribute. For pgsql the default is to use server-side prepares, so I'd be all for making both work consistently by default. However, I think PDO is fundamentally flawed in enforcing the use of prepared statements even when 99% of the times the queries issued by a PHP script need only to be executed once. It surely is a waste of resources having to allocate a prepared query, execute it and deallocate it each and every time. I certainly wish there was something in the mysql client/protocol similar to PQexecParams, which would be the best of both worlds. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php