Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvsqO-0001t5-Ek for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Dec 2021 03:14:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mvsqM-0001qd-PF for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Dec 2021 03:14:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvsqM-0001p9-HE for pgsql-bugs@lists.postgresql.org; Sat, 11 Dec 2021 03:14:38 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvsqK-0002PE-3r for pgsql-bugs@lists.postgresql.org; Sat, 11 Dec 2021 03:14:38 +0000 Received: (Authenticated sender: vik@postgresfriends.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2BD241C0003; Sat, 11 Dec 2021 03:14:33 +0000 (UTC) Subject: Re: BUG #17321: count(*) on a 1,874,554,883 rows partitioned table takes several minutes. To: deni_@hotmail.fr, pgsql-bugs@lists.postgresql.org References: <17321-a10c625e59181269@postgresql.org> From: Vik Fearing Message-ID: <93e50b9b-ffa4-2bfe-8b3c-5a286b9b2fc8@postgresfriends.org> Date: Sat, 11 Dec 2021 04:14:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <17321-a10c625e59181269@postgresql.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/6/21 3:57 AM, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 17321 > Logged by: Denis Campredon > Email address: deni_@hotmail.fr > PostgreSQL version: 13.3 > Operating system: count(*) slow on partitioned table > Description: > > I am auditing a database which has a really huge partitioned table. > When working on the whole table queries are slower than the cumulated time > for all partitions, as you can see with the following query. I don't have > yet timings for more complex operations like group by, but it looks like it > is slower than it should be. If I'm reading this correctly, it counted 1579 rows /per millisecond/. How may rows do you think it should have counted per millisecond? -- Vik Fearing