Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111705 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 18640 invoked from network); 28 Aug 2020 19:32:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Aug 2020 19:32:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1C80E1804C0 for ; Fri, 28 Aug 2020 11:36:10 -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 ; Fri, 28 Aug 2020 11:36:09 -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 5C4DE200284; Fri, 28 Aug 2020 20:36:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1598639767; bh=ajTh1F9et8xyMdX1itVwIzWQxFnG2YHadGhsc/VIaEY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Ywwr4G3v5QwoPjoSpI+UZXq2REZdi5js7ZoHd1M24WUB9u7e50BUFd6ms9dS9lkPe PdOPwgMBSu4t89ejyUdKy/3apPynY01wSOjnv6kve2Lk6xuAjO9zdsXH2OLi9cqMKb xYxcC2bj8Cv/yppQi1h50mvlcAU16zLcnfHOmRZrx0e0vXzVtJY5RNKShyMydkXJyw 8L+BWZGmFS5772mo9XTSte8Q85lK78u1sQaFEA9RklKxWE4Iga1iztiuAGB+ndfbPl Z+c8NmbrQOV6XMFzjTXcW8hR0zeJlsNVJ5oSeoAf7t16lIzJ0bUmRPyqg0XifcA0yg M6jEq8t0TyRNw== To: Gabriel Caruso Cc: "G. P. B." , =?UTF-8?Q?Dino_Pejakovi=c4=87?= , 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: <89a30aeb-0892-6b9a-03c3-72bc6154eda3@beccati.com> Date: Fri, 28 Aug 2020 20:36:02 +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 bind parameters From: php@beccati.com (Matteo Beccati) Hi Gabriel, > 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. The mileage may very: running the Doctrine test suite, for example, shows no difference at all. On the other side of the spectrum, a SELECT * FROM tbl WHERE id IN (?, ...) and 65535 parameters: https://gist.github.com/mbeccati/6f2cd094c38b094cb4bfc4c0245a23ab root@jameson /tmp # /tmp/php-7.4-std bench_pdo3.php Got rows: 65535 [Timings] prep: 0.018, exec: 0.210, fetch: 35.812 root@jameson /tmp # /tmp/php-7.4-opt bench_pdo3.php Got rows: 65535 [Timings] prep: 0.019, exec: 0.208, fetch: 0.026 That's almost 36 seconds vs 26ms. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/