On Sat, Apr 30, 2011 at 5:39 PM, Rasmus Lerdorf <ras...@lerdorf.com> wrote:

> On 04/30/2011 08:13 AM, Anthony Ferrara wrote:
>
>> I have already reported this issue on the bug tracker:
>> http://bugs.php.net/bug.php?id=54638
>>
>> But I figured it would be good to start a discussion on it here.  To
>> me, I consider this a pretty significant issue since it's not possible
>> to do true prepared statements while using PDO.  All the code to do so
>> is there (and it does work).  But it's just the single flag that
>> defaults emulation to be on that's holding things up.
>>
>> Since it will fallback to using emulation mode if the library or
>> server can't support prepared statements, I don't personally see any
>> issue with changing the default in a point release.
>>
>
> Do you realize why we did this in the first place? The common versions of
> MySQL in use out there are not very clever when it comes to the native
> prepared statement handling. First, there is no prepared statement cache, so
> there is no benefit to doing them natively, but worse, when you use a native
> prepared statement you completely miss the query result cache. As a result
> emulated prepared statements are either the same speed or faster than the
> native ones. Changing this default would result in a performance hit for
> most people. It should be better documented, but that is the only problem I
> see here.
>
>
I disable query_cache on my machines, because it can cause performance and
stability issues.
http://www.mysqlperformanceblog.com/2011/04/10/should-we-give-a-mysqlquery-cache-a-second-chance/

Tyrael

Reply via email to