Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111707 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59475 invoked from network); 29 Aug 2020 08:27:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Aug 2020 08:27:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 714D61804D9 for ; Sat, 29 Aug 2020 00:30:54 -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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DOS_RCVD_IP_TWICE_B, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from box.beccati.com (box.beccati.com [176.9.123.236]) (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 ; Sat, 29 Aug 2020 00:30:53 -0700 (PDT) Received: from authenticated-user (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.beccati.com (Postfix) with ESMTPSA id 886DC2002DA; Sat, 29 Aug 2020 09:30:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1598686251; bh=Q4QtTGQQ3Cm8p+JPnNNxdlm6dDg6bIcOltJwJ9yeCUo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=aiDc8OAREqHEOHu9m9susyhKrqDQ+cC3AJIFQ2S6EGi3NBPE8af396UGM2hlVIspf 2TLmCGseDggTQteGUnZ/F2JCo+zrl6qZw4dz6FGFwYcHmKEA8rGRI5LIYOnAOXuoEd 3wye/m9gPrLFJqIFffGW/bO+YBIjpSSgAYFreGk74tfiVjhTQJcA4kHNNMmoZgdIQH C8zkbU0Ms3UM1RaSbPfLhvLpkIsOEgxpZuClr5HdA6gwzQNJJmxCyg0iyUOrm387BT Hu4x/+uRxOmlfKRh7dKofTwP1eeNZsOASeWkENxpULmpI+09TpwwpaWy8+TgwB01Ev +MKEeDeYD6dkA== To: "Christoph M. Becker" , Gabriel Caruso Cc: "G. P. B." , =?UTF-8?Q?Dino_Pejakovi=c4=87?= , PHP internals , 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> <89a30aeb-0892-6b9a-03c3-72bc6154eda3@beccati.com> Message-ID: <63e9e61c-62cb-666e-8719-55d8b0901415@beccati.com> Date: Sat, 29 Aug 2020 09:30:50 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PDO fetch performance problems with many bindparameters From: php@beccati.com (Matteo Beccati) Hi Christoph, On 28/08/2020 22:57, Christoph M. Becker wrote: > Can we be certain that the relevant bits of the formerly _reserved_flags > are zero-filled for all existing drivers? We can, that's basically the premise of the PR itself: 1. The flags are in the pdo_dbh_t struct which is the dbh->inner part 2. dbh->inner = ecalloc(1, sizeof(pdo_dbh_t)): 3. stmt->dbh is set as dbh->inner, in prepare and query 4. drivers can eventually set some bits to 1. A few quick links: https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/php_pdo_driver.h#L514 https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/pdo_dbh.c#L562 https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/pdo_dbh.c#L1085 https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/pdo_dbh.c#L1481 Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/