Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRkcb-0005UQ-LK for pgsql-general@arkaria.postgresql.org; Tue, 27 Nov 2018 21:10:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRkca-0004Dk-F4 for pgsql-general@arkaria.postgresql.org; Tue, 27 Nov 2018 21:10:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRkca-0004DZ-6t for pgsql-general@lists.postgresql.org; Tue, 27 Nov 2018 21:10:16 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRkcW-00018f-31 for pgsql-general@postgresql.org; Tue, 27 Nov 2018 21:10:15 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 8DBB7107AB219 for ; Tue, 27 Nov 2018 14:10:09 -0700 (MST) Date: Tue, 27 Nov 2018 14:10:09 -0700 (MST) From: legrand legrand To: pgsql-general@postgresql.org Message-ID: <1543353009578-0.post@n3.nabble.com> In-Reply-To: <372d75cc-053b-1a07-948f-089408d3cd3a@gmail.com> References: <372d75cc-053b-1a07-948f-089408d3cd3a@gmail.com> Subject: Re: pg_stat_statements: can we extend the object names to the qualified names? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk A part of the answer would be to store explain (verbose on) select count(*) from t1; result in pg_stat_statements for the corresponding query... (Verbose On) gives the "qualified names": QUERY PLAN --------------------------------------- Aggregate (cost=19.38..19.39 rows=1 width=8) Output: count(*) -> Seq Scan on s1.t1 (cost=0.00..17.50 rows=750 width=0) Output: a1, a2, a3, a4, a5, a6 Extension pg_store_plans https://github.com/ossc-db/pg_store_plans can do it. Extesion auto_explain can help also. There are also some tryies to extend pg_stat_statements with plans see https://www.postgresql-archive.org/FEATURE-PATCH-pg-stat-statements-with-plans-td5940964.html Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html