From: Jerry Sievers <gsievers19@comcast.net>
To: kunwar singh <krishsingh.111@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Is there any tool which will help me run and explain analyze about 150 queries?
Date: Fri, 07 Apr 2023 23:40:36 -0500
Message-ID: <m04jprx9yz.fsf@comcast.net> (raw)
In-Reply-To: <CAJSrDUpaJC5+ZsTN1D4OUa8S7d0XBQD413XnZM2JVGjr_Z4xuA@mail.gmail.com>
References: <CAJSrDUpaJC5+ZsTN1D4OUa8S7d0XBQD413XnZM2JVGjr_Z4xuA@mail.gmail.com>
kunwar singh <krishsingh.111@gmail.com> writes:
> 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 :)
I'd use a tool like bash for this which is very affordable :-)
Just load your queries into individual files in some directory with a
.sql suffix...
for file in $some-directory/*.sql; do
psql <<EOF >$file.explain-output 2>&1
explain analyze
$(<$file)
EOF
done
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gsievers19@comcast.net, krishsingh.111@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: Is there any tool which will help me run and explain analyze about 150 queries?
In-Reply-To: <m04jprx9yz.fsf@comcast.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox