public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Vijaykumar Jain <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: explain vs auto_explain
Date: Sat, 19 Oct 2024 14:01:56 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwY0SSLdm7KLmRVouXD_2=60-oOsdXfF56gx9n=bNhvWnw@mail.gmail.com>
References: <CAM+6J96FeJxruxqPcZTxTuanKbZzmy0AUMOzChAr72y4iSd+7g@mail.gmail.com>
<CAKFQuwYCf42_Gvf3pbyjgYzJ2-adS6j_hBgde+ORck2vXXKO5w@mail.gmail.com>
<CAM+6J949waO2r35PDFJ65fy1Anc+oukOOy_CRw4wY65qiNc_2g@mail.gmail.com>
<CAKFQuwY0SSLdm7KLmRVouXD_2=60-oOsdXfF56gx9n=bNhvWnw@mail.gmail.com>
"David G. Johnston" <[email protected]> writes:
> On Sat, Oct 19, 2024 at 10:43 AM Vijaykumar Jain <
> [email protected]> wrote:
>> i tried to check the code for auto_explain , there is nothing that helps
>> understand why it was provided as a separate .
> Probably because output to log was easier than reworking the internals to
> make output to client happen.
The reason that auto_explain exists is to capture plans for queries
that are being issued by real applications --- which aren't programmed
to issue EXPLAIN for themselves, and likely don't have a good place to
put the data if they did. Also, auto_explain can capture runtime
details for queries that are really being executed and delivering
results, whereas EXPLAIN ANALYZE doesn't deliver the query results and
thus can't be shoehorned into real applications. So it's partly a
matter of not having a protocol spec that would allow the EXPLAIN data
to be delivered on a side channel, but mostly a recognition that
rewriting applications to capture such data would be painful.
regards, tom lane
view thread (4+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: explain vs auto_explain
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox