Thread: Disabling memory display in EXPLAIN ANALYZE

Disabling memory display in EXPLAIN ANALYZE

From
Andres Freund
Date:
Hi,

The, now reverted, MERGE patch used EXPLAIN (ANALYZE, COSTS OFF, TIMING
OFF) on a few queries. That doesn't seem like a bad idea when it's
interesting to display the plan and run a query without (interesting)
results.  Otherwise one has to duplicate the query.

But right now it triggers differences like:

***************
*** 887,893 ****
           Hash Cond: (s.sid = t_1.tid)
           ->  Seq Scan on source s (actual rows=3 loops=1)
           ->  Hash (actual rows=3 loops=1)
!                Buckets: 1024  Batches: 1  Memory Usage: 9kB
                 ->  Seq Scan on target t_1 (actual rows=3 loops=1)
   Trigger merge_ard: calls=1
   Trigger merge_ari: calls=1
--- 887,893 ----
           Hash Cond: (s.sid = t_1.tid)
           ->  Seq Scan on source s (actual rows=3 loops=1)
           ->  Hash (actual rows=3 loops=1)
!                Buckets: 1024  Batches: 1  Memory Usage: 5kB
                 ->  Seq Scan on target t_1 (actual rows=3 loops=1)
   Trigger merge_ard: calls=1
   Trigger merge_ari: calls=1

***************
*** 1320,1330 ****
           Merge Cond: (t_1.a = s.a)
           ->  Sort (actual rows=50 loops=1)
                 Sort Key: t_1.a
!                Sort Method: quicksort  Memory: 27kB
                 ->  Seq Scan on ex_mtarget t_1 (actual rows=50 loops=1)
           ->  Sort (actual rows=100 loops=1)
                 Sort Key: s.a
!                Sort Method: quicksort  Memory: 33kB
                 ->  Seq Scan on ex_msource s (actual rows=100 loops=1)
  (15 rows)
  
--- 1320,1330 ----
           Merge Cond: (t_1.a = s.a)
           ->  Sort (actual rows=50 loops=1)
                 Sort Key: t_1.a
!                Sort Method: quicksort  Memory: 19kB
                 ->  Seq Scan on ex_mtarget t_1 (actual rows=50 loops=1)
           ->  Sort (actual rows=100 loops=1)
                 Sort Key: s.a
!                Sort Method: quicksort  Memory: 24kB
                 ->  Seq Scan on ex_msource s (actual rows=100 loops=1)
  (15 rows)

i.e. memory consumption differs between environments. Which isn't
surprising.

I wonder if we could disable the display with a separate switch or tie
it to !'COSTS OFF && TIMING OFF' or such?

Greetings,

Andres Freund


Re: Disabling memory display in EXPLAIN ANALYZE

From
Stephen Frost
Date:
Greetings,

* Andres Freund (andres@anarazel.de) wrote:
> i.e. memory consumption differs between environments. Which isn't
> surprising.
>
> I wonder if we could disable the display with a separate switch or tie
> it to !'COSTS OFF && TIMING OFF' or such?

Yeah, I agree with having these suppressed when we're running the
regression tests.  I don't particularly care for having them suppressed
under either costs or timing off though, as those are really pretty
specific and independnet flags.  Perhaps what we need is a flag that
says 'regression mode'...

Thanks!

Stephen

Attachment

Re: Disabling memory display in EXPLAIN ANALYZE

From
Andres Freund
Date:
Hi,

On 2018-04-02 17:01:08 -0400, Stephen Frost wrote:
> * Andres Freund (andres@anarazel.de) wrote:
> > i.e. memory consumption differs between environments. Which isn't
> > surprising.
> > 
> > I wonder if we could disable the display with a separate switch or tie
> > it to !'COSTS OFF && TIMING OFF' or such?
> 
> Yeah, I agree with having these suppressed when we're running the
> regression tests.  I don't particularly care for having them suppressed
> under either costs or timing off though, as those are really pretty
> specific and independnet flags.

We already put a number of loosely related things in there, so I don't
think that'd be that weird to continue along those lines.


> Perhaps what we need is a flag that says 'regression mode'...

DWIM mode? reproducible mode?

Greetings,

Andres Freund