Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE
Nikolay Samokhvalov <samokhvalov@gmail.com>
From: Nikolay Samokhvalov <samokhvalov@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2024-11-05T18:24:36Z
Lists: pgsql-hackers
On Tue, Nov 5, 2024 at 10:19 AM Robert Haas <robertmhaas@gmail.com> wrote: > On Tue, Nov 5, 2024 at 1:02 PM Nikolay Samokhvalov > <samokhvalov@gmail.com> wrote: > > hi, I have a proposal, resulted from numerous communications with > various folks, both very experienced and new Postgres users: > > > > 1) EXPLAIN ANALYZE Is sometimes very confusing (because there is > ANALYZE). Let's rename it to EXPLAIN EXECUTE? > > The trouble is that EXPLAIN EXECUTE already means something. > > robert.haas=# explain execute foo; > ERROR: prepared statement "foo" does not exist > > Granted, that would not make it impossible to make EXPLAIN (EXECUTE) a > synonym for EXPLAIN (ANALYZE), but IMHO it would be pretty confusing > if EXPLAIN EXECUTE and EXPLAIN (EXECUTE) did different things. > > > 2) VERBOSE doesn't include BUFFERS, and doesn't include SETTINGS; it > might be also confusing sometimes. Let's include them so VERBOSE would be > really verbose? > > I agree that the naming here isn't great, but I think making the > options non-orthogonal would probably be worse. > > > 3) small thing about grammar: allow omitting parentheses, so EXPLAIN > EXECUTE VERBOSE would work. > > Perhaps surprisingly, it turns out that this is not a small change. As > Tom mentions, this would have a pretty large blast radius. In fact, > the reason I wrote the patch to introduce parenthesized options for > EXPLAIN was precisely because the unparenthesized option syntax does > not scale nicely at all. > I appreciate all yours and Tom's very quick comments here! Item 3 is already solved, as it turned out. Let's focus on item 2. Is it really impossible to make VERBOSE really verbose?
Commits
-
Fix further fallout from EXPLAIN ANALYZE BUFFERS change
- 89988ac5891b 18.0 landed
-
Add missing BUFFERS OFF in regression tests, take 2
- 9df2a4b9316f 18.0 landed
-
Add missing BUFFERS OFF in select_into regression tests
- 9fa1aaa6525a 18.0 landed
-
Enable BUFFERS with EXPLAIN ANALYZE by default
- c2a4078ebad7 18.0 landed