Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87792 invoked from network); 30 Apr 2011 15:45:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2011 15:45:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:36509] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 73/BC-10915-98E2CBD4 for ; Sat, 30 Apr 2011 11:45:14 -0400 Received: by eyf5 with SMTP id 5so1411764eyf.29 for ; Sat, 30 Apr 2011 08:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FggKR5cDp5LCqgJxZ/+SwgQTvvpFLMKYylwphbhItY8=; b=Ze3vgGcJrxOiY00TGy/YU8wXNyOeHFcItiSS6l80sPjd4He9tdezoxq0aIQ5+zMuk5 xZ9TACYwIwLn1JTZObU/3jTNgmcX5ikItJQaLwYnmoYD00ie8FFJKt4dSRJSbZBXXESp cRFJci7l4xU+JGIyKkcp9VTthZVFbbEPAtODw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=oi599X2hjIRqss6UHpbeXYqp0MFcay//1k9kQmiCBWCQ7f21I1PYE5TBe2Q76BViSg a4rmI6IrZSf6KHPUCB5dy59NLAvI92PT3RR+VEMCX+HOlD+YYzkRNhEmth2aI2QgUr8P ZsWw0gYd3KXWZWqItKZoNjEHQjYHxDMfe5teM= MIME-Version: 1.0 Received: by 10.14.2.31 with SMTP id 31mr2594646eee.167.1304178309752; Sat, 30 Apr 2011 08:45:09 -0700 (PDT) Sender: tyra3l@gmail.com Received: by 10.14.127.79 with HTTP; Sat, 30 Apr 2011 08:45:09 -0700 (PDT) In-Reply-To: <4DBC2D1B.10302@lerdorf.com> References: <4DBC2D1B.10302@lerdorf.com> Date: Sat, 30 Apr 2011 17:45:09 +0200 X-Google-Sender-Auth: _wmyLX3oD5T9e95axAs6lQrt7ho Message-ID: To: Rasmus Lerdorf Cc: Anthony Ferrara , internals@lists.php.net Content-Type: multipart/alternative; boundary=0016364268a7e0688404a224acdd Subject: Re: [PHP-DEV] Change Request: Make PDO default to not emulate prepared statements for MySQL From: info@tyrael.hu (Ferenc Kovacs) --0016364268a7e0688404a224acdd Content-Type: text/plain; charset=UTF-8 On Sat, Apr 30, 2011 at 5:39 PM, Rasmus Lerdorf 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 --0016364268a7e0688404a224acdd--