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 1lhG5J-0008KM-1M for pgsql-hackers@arkaria.postgresql.org; Thu, 13 May 2021 18:29:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhG5H-0007nC-VL for pgsql-hackers@arkaria.postgresql.org; Thu, 13 May 2021 18:29:19 +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 1lhG5H-0007n4-Nv for pgsql-hackers@lists.postgresql.org; Thu, 13 May 2021 18:29:19 +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 1lhG5F-0002PB-N2 for pgsql-hackers@lists.postgresql.org; Thu, 13 May 2021 18:29:18 +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 14DIT9Cu1579536; Thu, 13 May 2021 14:29:09 -0400 From: Tom Lane To: Stephen Frost cc: Bruce Momjian , Christoph Berg , Julien Rouhaud , 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: <20210513180706.GG20766@tamriel.snowman.net> References: <20210513005236.aj7n6b76yjsxythc@nol> <20210513011325.GA11075@momjian.us> <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> Comments: In-reply-to Stephen Frost message dated "Thu, 13 May 2021 14:07:06 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1579534.1620930549.1@sss.pgh.pa.us> Date: Thu, 13 May 2021 14:29:09 -0400 Message-ID: <1579535.1620930549@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Stephen Frost writes: > There's a ridiculously simple option here which is: drop the idea that > we support an extension redefining the query id and then just make it > on/off with the default to be 'on'. I do not think that defaulting it to 'on' is acceptable unless you can show that the added overhead is negligible. IIUC the measurements that have been done show the opposite. Maybe we should revert this thing pending somebody doing the work to make a version of queryid labeling that actually is negligibly cheap. It certainly seems like that could be done; one more traversal of the parse tree can't be that expensive in itself. I suspect that the performance problem is with the particular hashing mechanism that was used, which looks mighty ad-hoc anyway. regards, tom lane