Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111704 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97366 invoked from network); 28 Aug 2020 14:48:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Aug 2020 14:48:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5FF631804D9 for ; Fri, 28 Aug 2020 06:51:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mg02.mydataknox.com (mg02.mydataknox.com [185.62.73.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 28 Aug 2020 06:51:48 -0700 (PDT) X-AuditID: c0a88e79-2a9ff70000004872-1e-5f490bf2c1a1 Received: from cp007.mydataknox.com (cp007.mydataknox.com [185.62.73.141]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mg02.mydataknox.com (Mydataknox Mail Gateway) with SMTP id CE.07.18546.2FB094F5; Fri, 28 Aug 2020 15:51:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=voxdiversa.hr; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qKBj2GaIVZ37v5YK0ONrcQ/s0SkaPe/g/GOp7HecEM0=; b=LpdBWSvov0bx+OvXnq35PfIBUk aQS7pfrSYAT99P4sKxjp8GzPhwHujT6NcT+A09Lg3kMAITZC7ruE4tWqPshvVv7kJ1kDriKTmxg5q ZtBI2Tc975cpr56jQclTHdergWdSkCaqleb94/eNie8r3TikOmiGB92s+MpWCqVwJZLOBH6sY2BfT 8YPyJJJcCLiF7hslSN0w+VDPiLBjccIOoOuv9R0xzSYhqfKzEzSadUTrQTcoBVkdFuQpr5y1RHLqQ V+1koc3HjKZnQC1uLc3LtVsepYsyuBqdumjuGW+X6R/THkwkO/Ps9xDcJKSraSCGGqs+umFHVOUSD 6LsTE+LA==; Received: from [82.214.97.81] (port=44780 helo=[10.0.0.201]) by cp007.mydataknox.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kBen5-0002pd-Hf; Fri, 28 Aug 2020 15:51:44 +0200 To: Gabriel Caruso , Matteo Beccati Cc: "G. P. B." , PHP internals , Christoph Michael Becker , Derick Rethans , Sara Golemon References: <08b959f5-7652-5e8a-562a-c2659facec8c@voxdiversa.hr> <20277058-b463-038a-4333-eacd023ccdc4@beccati.com> <3220cfac-aeca-0e28-3574-77e2b2c89b1d@beccati.com> Message-ID: Date: Fri, 28 Aug 2020 15:51:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Thunderbird/80.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cp007.mydataknox.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - voxdiversa.hr X-Get-Message-Sender-Via: cp007.mydataknox.com: authenticated_id: dino.pejakovic@voxdiversa.hr X-Authenticated-Sender: cp007.mydataknox.com: dino.pejakovic@voxdiversa.hr X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Brightmail-Tracker: H4sIAAAAAAAAA02Sf0wTZxjH996d12vh8CgyHn4YQ5HpEBEYZcum6BLd7KKJZhnJdBve4Ggb +4O0dQP/YHhqsspcZKjRTguioG6Nqwy1BCOs/CpMwsLCzKqiIoOu2kZM2GRsujuuKP+8+bzP 832/l+9zD4UrW2VJlN5k4ywm1qAiFURrgebgysdRmqLsPeGYNzpCl8l1aOPYBRexBW1TrC7h DPrPOMuqgh0KnctdWTbKlE/O8LIqVE8fQHIKmDw44XbJRFYylzBouqQ5gBQUwfhI2Dd9lRQv SuYgBnu62oQLRcUxW4HviRIfLGI2wTjvJ0QNzvyEYHBiSiY9CGFw9/hjTFSRzHrwnK4hRKaZ dTB0uJ4UmWDS4VjNwCzHM4Uw2tSMS5pY6Ds+NquXCx87038EiYwz+eD88R4u8RK4EjoR4QTw j9VhUpxXYNTdJJN4G/zXNkzMxRzsPhnRZMIDJx+pvwkzna4I50K1/eECiT+Bamd7xOc9OObz ROoK6DjiJCVeCJ3fjiCJY+DaKXekvgIu/3ufPIQWO+bFccyL4JgXwTEvQj0ivkNxRm12bpax ooS1sTtN5vKsYrOxGQk/uuPc1xUetN+j9SKMQl6USGGqeDpHoSlSxnxqLqnQsVZdkWWXgbN6 EVC4ahH9oPvdIiVdwlbs5izmuVYyRagS6F+eoI+VjJa1cTs5royzzHVTKEoFtF40jbVwWq68 VG+wvWhjlFw0jxbM/XJBQ1vLWKNVr5X6/Wgt1drtbMCpP2bPwPBp4Wx/dKYBVxIms4lLSqDT RGtGfKbbZXruPLfIQdSOKKSKozOEhVZGC3v+3Dy3UegwHjk8tIcXQBd/k4TJzr1yeHa1TQ6B kUE5TPG9Cghc90VDXc/+GAg8/XUhNNd2x0Kw7m8A9/RkMnj2DaeA/atbKVB742wqPOPPp4K3 p1EFvztmVBB4ci0NRkZuLYOWut7l0NfifRWCP7dkQrhvYCVMhcezwDHQmAOuvYdzoaPqxmvw JR/MA9/QkBpG/7ythgvuo/lBYT6YMJ+ThRvE+djYFxGSqlDpD5tfGqr1no1PvPeh//3kFd9E T3g3QantInxRvDbbeffO9+XOqM9XGaeXVCd+kJHQ//ZNrVqztZjrWhq/JlyJh/y73am3Dxn+ ub4xffWGfOKpb5wP3TllofP/cpeOpy2dyNTXNOS91fzyO5vP2Xt32O+rCxa/XhkqfLT9tysf qdccTVcRVh2bk4FbrOz/vSdoDEwEAAA= Subject: Re: [PHP-DEV] PDO fetch performance problems with many bind parameters From: dino.pejakovic@voxdiversa.hr (=?UTF-8?Q?Dino_Pejakovi=c4=87?=) The script I used to pinpoint this problem and test my temporary fix, and later Matteo's PR is linked in the bug report I oppened. Should be simple to run if anyone is interested in trying. I found this on pdo_pgsql, but looking at the code it looks like the problem should happen on other pdo_* drivers too, I can do more tests if it matters. On 28. 08. 2020. 14:50, Gabriel Caruso wrote: > On Fri, 28 Aug 2020 at 09:19, Matteo Beccati wrote: > >> Hi George, >> >> /cc release managers - pls don't hate me ;-) >> >> On 27/08/2020 10:23, Matteo Beccati wrote: >>> On 26/08/2020 19:28, G. P. B. wrote: >>>> This can still target PHP 8.0 as this seems to be akin to a bug this >>>> might even be applicable to PHP 7.3/7.4. Anyways, good catch. >>> You could be right. I've created a draft PR for review: Dino could yo> >> please benchmark it and get back with results?> > >> https://github.com/php/php-src/pull/6047 >> The PR seems to fix the issue: >> >> https://bugs.php.net/bug.php?id=80027 >> >> Dino's bench script takes 3s on vanilla PHP8 and 120ms with the patch, >> so it's seems a fairly good win. The fetching part alone goes down from >> 2.9s to 3ms. >> >> The way it's been fixed should be backwards and forwards compatible with >> no real need to bump PDO_VERSION_API: external PDO driver extensions >> wanting to use the param_evt_skip flags could simply set them via a >> preprocessor macro when compiled for PHP8+. >> >> For now I've optimised the pdo_pgsql/mysql/sqlite extensions, but I will >> look into the other bundled ones too. >> >> Would you think it's sensible to treat this as a bug fix and target >> 7.3+? Or is it better to do PHP8 only? Or? >> >> >> Cheers >> -- >> Matteo Beccati >> >> Development & Consulting - http://www.beccati.com/ > > > Hello Matteo > > Let's have this patch merged into PHP 8.0 (`master` branch as of today), I > have nothing against it. > > About PHPs 7.3 and 7.4: if the performance improvements are this massive as > describe in this email, I'm :+1: to have it on those versions as well. > > Kind regards, >