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 1lhMv7-0002H6-O6 for pgsql-hackers@arkaria.postgresql.org; Fri, 14 May 2021 01:47:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhMv6-0007nu-Iv for pgsql-hackers@arkaria.postgresql.org; Fri, 14 May 2021 01:47:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhMv6-0007nl-Aw for pgsql-hackers@lists.postgresql.org; Fri, 14 May 2021 01:47:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhMv4-0005zx-C7 for pgsql-hackers@lists.postgresql.org; Fri, 14 May 2021 01:47:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 14E1l2bo1787239; Thu, 13 May 2021 21:47:02 -0400 From: Tom Lane To: Julien Rouhaud cc: Bruce Momjian , Stephen Frost , Christoph Berg , Pavel Stehule , Kyotaro Horiguchi , Magnus Hagander , Fujii Masao , Michael Paquier , Andres Freund , Alvaro Herrera , Peter Eisentraut , PostgreSQL Hackers Subject: Re: compute_query_id and pg_stat_statements In-reply-to: References: <20210513015700.fp33q5rfvwl2ahfx@nol> <20210513030652.GB11075@momjian.us> <20210513031613.j47baglf6xl3mgbs@nol> <20210513033332.GF11075@momjian.us> <20210513040342.fouh7ryglrfgxglu@nol> <20210513144143.GG11075@momjian.us> <20210513175947.GP11075@momjian.us> <20210513180706.GG20766@tamriel.snowman.net> <1579535.1620930549@sss.pgh.pa.us> <20210513191159.GA22929@momjian.us> Comments: In-reply-to Julien Rouhaud message dated "Fri, 14 May 2021 09:36:19 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1787237.1620956822.1@sss.pgh.pa.us> Date: Thu, 13 May 2021 21:47:02 -0400 Message-ID: <1787238.1620956822@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Julien Rouhaud writes: > On Fri, May 14, 2021 at 3:12 AM Bruce Momjian wrote: >> I was surprised it was ~2%. > Just to be clear, the 2% was a worst case scenario, ie. a very fast > read-only query on small data returning a single row. As soon as you > get something more realistic / expensive the overhead goes away. Of course, for plenty of people that IS the realistic scenario that they care about max performance for. regards, tom lane