Re: Is there any tool which will help me run and explain analyze about 150 queries?

From: kunwar singh <krishsingh(dot)111(at)gmail(dot)com>
To: kyle Hailey <kylelf(at)gmail(dot)com>
Cc: Jerry Sievers <gsievers19(at)comcast(dot)net>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Is there any tool which will help me run and explain analyze about 150 queries?
Date: 2023-04-09 22:15:33
Message-ID: CAJSrDUpSkvowFMA7vN8H8vu1zGShi2g=TUe0znb=YZjEK5p2Tg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Thanks, I'll check it out!

On Sat, Apr 8, 2023 at 5:45 PM kyle Hailey <kylelf(at)gmail(dot)com> wrote:

>
> Just wrote up my experiences setting up auto_explain on Google Cloud SQL
> to get explain analyze:
>
> https://www.kylehailey.com/post/auto_explain-on-google-cloud-sql-gcp
>
>
>
>
> On Fri, Apr 7, 2023 at 9:40 PM Jerry Sievers <gsievers19(at)comcast(dot)net>
> wrote:
>
>> kunwar singh <krishsingh(dot)111(at)gmail(dot)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
>>
>>
>>

--
Cheers,
Kunwar

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message milist ujang 2023-04-11 03:39:38 Re: Replication lag due to lagging restart_lsn
Previous Message kyle Hailey 2023-04-08 21:44:28 Re: Is there any tool which will help me run and explain analyze about 150 queries?