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 1pkqgd-00012q-TS for pgsql-performance@arkaria.postgresql.org; Fri, 07 Apr 2023 18:19:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkqgc-0002Dl-GD for pgsql-performance@arkaria.postgresql.org; Fri, 07 Apr 2023 18:19:46 +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 1pkqgc-0002Dc-6O for pgsql-performance@lists.postgresql.org; Fri, 07 Apr 2023 18:19:46 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pkqgV-001UPB-Ad for pgsql-performance@lists.postgresql.org; Fri, 07 Apr 2023 18:19:45 +0000 Content-Type: multipart/alternative; boundary="------------rYECG0bqg4voYjjQMnotnvHN" Message-ID: <4e61d244-2d2b-e67a-42ab-6bd523a2153c@cloud.gatewaynet.com> Date: Fri, 7 Apr 2023 21:19:36 +0300 MIME-Version: 1.0 Subject: Re: Is there any tool which will help me run and explain analyze about 150 queries? To: pgsql-performance@lists.postgresql.org References: Content-Language: en-US From: Achilleas Mantzios In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------rYECG0bqg4voYjjQMnotnvHN Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Prepend "EXPLAIN ANALYZE " on every statement : cat foo.sql  | awk '{print " EXPLAIN (ANALYZE, BUFFERS, TIMING, SUMMARY) " $0}' | psql testdb -f - Στις 7/4/23 20:57, ο/η kunwar singh έγραψε: > Hi Listers, > Anyone here use such a tool for Postgres? Any recommendations? > > Say I have 150 queries in Postgres 11 and I want to upgrade to > Postgres 15. I want to run explain analyze for 150 in both versions > for comparative analysis. > > I am looking for the easiest way to do it with a tool :) > > -- > Cheers, > Kunwar -- Achilleas Mantzios IT DEV - HEAD IT DEPT Dynacom Tankers Mgmt --------------rYECG0bqg4voYjjQMnotnvHN Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Prepend "EXPLAIN ANALYZE " on every statement :

cat foo.sql  | awk '{print " EXPLAIN (ANALYZE, BUFFERS, TIMING, SUMMARY) " $0}' | psql testdb -f -

Στις 7/4/23 20:57, ο/η kunwar singh έγραψε:
Hi Listers,
Anyone here use such a tool for Postgres? Any recommendations?

Say I have 150 queries in Postgres 11 and I want to upgrade to Postgres 15. I want to run explain analyze for 150 in both versions for comparative analysis. 

I am looking for the easiest way to do it with a tool :) 

--
Cheers,
Kunwar
-- 
Achilleas Mantzios
 IT DEV - HEAD
 IT DEPT
 Dynacom Tankers Mgmt
--------------rYECG0bqg4voYjjQMnotnvHN--