Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111703 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90890 invoked from network); 28 Aug 2020 13:47:17 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Aug 2020 13:47:17 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CFBCE1804D2 for ; Fri, 28 Aug 2020 05:50:56 -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=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 28 Aug 2020 05:50:56 -0700 (PDT) Received: by mail-io1-f49.google.com with SMTP id h4so1072685ioe.5 for ; Fri, 28 Aug 2020 05:50:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uvwr1XAJw43VUdUL+f/OqC9UfJMADxAms4E7Oa4yWJI=; b=kU89yf0aox2ckSgCqVre7pxCUv/Zf2Hbr63p4Oa4lvnSRzVkTJs0+PvcShyd9t/h5i dsVFfFdtmv9wlc51EXl3aJPOV0ecMicASuhOZQBtt3Vt0rsW2Sm2KVjAwjrbMZwXAuF6 YoTOTbBy6vzCDSQi1vTIKNfezSU3NkfLY8Ql5bM+umZGKmm6c1N87e9n59ZjALgoMBb/ ey2Hm04pw3rBMryEKf0nTX5gw3BCZ+Tpe93Ne6j/nor14d5B0lT6lAcMt+gvTPmSe0kH 4y1TZWH5l4wGsUArGa6htW4mXOoz0tshjUT3JW0062QlrHkvS4xbLqM7+xFGfjHeId35 l9Og== X-Gm-Message-State: AOAM532R6D9Bak3MSn2qCcB1JnN5v8ZMEgBOOiTG5YSgbBV82j6olQDV /f+/tJrJbrFkS+qD4nDt/2VKRi0B6RIfSEV2 X-Google-Smtp-Source: ABdhPJyIL1EiDGzRQ1MAIkDyMrsw1LxzvCGpTRUv56MPL5OpyRjbZ92qeOOPS+LYTRKoItH3D7K7vQ== X-Received: by 2002:a05:6602:1583:: with SMTP id e3mr1192510iow.173.1598619053953; Fri, 28 Aug 2020 05:50:53 -0700 (PDT) Received: from mail-il1-f174.google.com (mail-il1-f174.google.com. [209.85.166.174]) by smtp.gmail.com with ESMTPSA id i85sm546758ile.27.2020.08.28.05.50.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Aug 2020 05:50:53 -0700 (PDT) Received: by mail-il1-f174.google.com with SMTP id j9so707581ilc.11 for ; Fri, 28 Aug 2020 05:50:53 -0700 (PDT) X-Received: by 2002:a05:6e02:13ac:: with SMTP id h12mr1257893ilo.153.1598619053216; Fri, 28 Aug 2020 05:50:53 -0700 (PDT) MIME-Version: 1.0 References: <08b959f5-7652-5e8a-562a-c2659facec8c@voxdiversa.hr> <20277058-b463-038a-4333-eacd023ccdc4@beccati.com> <3220cfac-aeca-0e28-3574-77e2b2c89b1d@beccati.com> In-Reply-To: <3220cfac-aeca-0e28-3574-77e2b2c89b1d@beccati.com> Date: Fri, 28 Aug 2020 14:50:37 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Matteo Beccati Cc: "G. P. B." , =?UTF-8?Q?Dino_Pejakovi=C4=87?= , PHP internals , Christoph Michael Becker , Derick Rethans , Sara Golemon Content-Type: multipart/alternative; boundary="000000000000cc5c0a05adef804c" Subject: Re: [PHP-DEV] PDO fetch performance problems with many bind parameters From: carusogabriel@php.net (Gabriel Caruso) --000000000000cc5c0a05adef804c Content-Type: text/plain; charset="UTF-8" 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, --000000000000cc5c0a05adef804c--