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