explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gFud

Settings
# exclusive inclusive rows x rows loops node
1. 0.085 13,357.038 ↓ 0.0 0 1

GroupAggregate (cost=45,902.53..45,903.22 rows=2 width=243) (actual time=13,357.038..13,357.038 rows=0 loops=1)

  • Group Key: t2._q_000_f_000rref, t2._q_000_f_001rref, t2._q_000_f_002rref, t2._q_000_f_003rref, t2._q_000_f_004
  • Filter: (((t2._q_000_f_004 = '0001-01-01 00:00:00'::timestamp without time zone) AND ((sum((sum((sum(t5._fld18302))))) < '0'::numeric) OR ((sum((sum((sum(t5._fld18302))))) - sum((sum((sum(t5._fld18305)))))) < '0'::numeric) OR (((sum((sum((sum(t5._fld18302))))) - sum((sum((sum(t5._fld18305)))))) - sum((sum((sum(t5._fld18304)))))) < '0'::numeric))) OR ((((sum((sum((sum(t5._fld18302))))) - sum((sum((sum(t5._fld18305)))))) - sum((sum((sum(t5._fld18304)))))) - sum((0.000::numeric(15,3)))) < '0'::numeric))
  • Rows Removed by Filter: 2
2. 0.015 13,356.953 ↑ 1.0 2 1

Sort (cost=45,902.53..45,902.53 rows=2 width=230) (actual time=13,356.952..13,356.953 rows=2 loops=1)

  • Sort Key: t2._q_000_f_000rref, t2._q_000_f_001rref, t2._q_000_f_002rref, t2._q_000_f_003rref, t2._q_000_f_004
  • Sort Method: quicksort Memory: 25kB
3. 0.001 13,356.938 ↑ 1.0 2 1

Append (cost=45,895.65..45,902.52 rows=2 width=230) (actual time=13,356.909..13,356.938 rows=2 loops=1)

4. 0.011 13,356.932 ↓ 2.0 2 1

Nested Loop (cost=45,895.65..45,899.29 rows=1 width=209) (actual time=13,356.909..13,356.932 rows=2 loops=1)

5. 0.007 13,356.899 ↓ 2.0 2 1

Nested Loop (cost=45,895.23..45,896.46 rows=1 width=190) (actual time=13,356.890..13,356.899 rows=2 loops=1)

  • Join Filter: ((t2._q_000_f_000rref = t5._fld18299rref) AND (t2._q_000_f_001rref = t5._fld18300rref) AND (t2._q_000_f_002rref = t5._fld18301rref))
  • Rows Removed by Join Filter: 2
6. 0.013 13,356.880 ↑ 1.0 2 1

GroupAggregate (cost=45,895.23..45,895.33 rows=2 width=150) (actual time=13,356.875..13,356.880 rows=2 loops=1)

  • Group Key: t5._fld18299rref, t5._fld18301rref, t5._fld18300rref
  • Filter: ((sum((sum(t5._fld18302))) <> '0'::numeric) OR (sum((sum(t5._fld18304))) <> '0'::numeric) OR (sum((sum(t5._fld18305))) <> '0'::numeric))
7. 0.012 13,356.867 ↓ 2.0 4 1

Sort (cost=45,895.23..45,895.24 rows=2 width=150) (actual time=13,356.864..13,356.867 rows=4 loops=1)

  • Sort Key: t5._fld18299rref, t5._fld18301rref, t5._fld18300rref
  • Sort Method: quicksort Memory: 25kB
8. 0.002 13,356.855 ↓ 2.0 4 1

Append (cost=7.08..45,895.22 rows=2 width=150) (actual time=0.075..13,356.855 rows=4 loops=1)

9. 0.009 0.077 ↓ 2.0 2 1

GroupAggregate (cost=7.08..7.14 rows=1 width=150) (actual time=0.075..0.077 rows=2 loops=1)

  • Group Key: t5._fld18299rref, t5._fld18301rref, t5._fld18300rref
  • Filter: ((sum(t5._fld18302) <> '0'::numeric) OR (sum(t5._fld18304) <> '0'::numeric) OR (sum(t5._fld18305) <> '0'::numeric))
10. 0.005 0.068 ↓ 2.0 2 1

Sort (cost=7.08..7.09 rows=1 width=64) (actual time=0.068..0.068 rows=2 loops=1)

  • Sort Key: t5._fld18299rref, t5._fld18301rref, t5._fld18300rref
  • Sort Method: quicksort Memory: 25kB
11. 0.003 0.063 ↓ 2.0 2 1

Nested Loop (cost=1.58..7.07 rows=1 width=64) (actual time=0.043..0.063 rows=2 loops=1)

12. 0.004 0.022 ↑ 1.0 2 1

Unique (cost=1.03..1.05 rows=2 width=68) (actual time=0.019..0.022 rows=2 loops=1)

13. 0.011 0.018 ↑ 1.0 2 1

Sort (cost=1.03..1.03 rows=2 width=68) (actual time=0.018..0.018 rows=2 loops=1)

  • Sort Key: t6._q_000_f_000rref, t6._q_000_f_001rref, t6._q_000_f_002rref, t6._q_000_f_003rref
  • Sort Method: quicksort Memory: 25kB
14. 0.007 0.007 ↑ 1.0 2 1

Seq Scan on tt115 t6 (cost=0.00..1.02 rows=2 width=68) (actual time=0.007..0.007 rows=2 loops=1)

15. 0.038 0.038 ↑ 1.0 1 2

Index Scan using _accumrg18308_bydims_trrrrr on _accumrgt18308 t5 (cost=0.56..3.00 rows=1 width=82) (actual time=0.017..0.019 rows=1 loops=2)

  • Index Cond: ((_fld775 = '0'::numeric) AND (_period = '3999-11-01 00:00:00'::timestamp without time zone) AND (_fld18299rref = t6._q_000_f_000rref) AND (_fld18300rref = t6._q_000_f_001rref) AND (_fld18301rref = t6._q_000_f_002rref) AND (_fld21963rref = t6._q_000_f_003rref))
  • Filter: (((_fld18302 <> '0'::numeric) OR (_fld18304 <> '0'::numeric) OR (_fld18305 <> '0'::numeric)) AND ((_fld18302 <> '0'::numeric) OR (_fld18304 <> '0'::numeric) OR (_fld18305 <> '0'::numeric)))
16. 0.104 13,356.776 ↓ 2.0 2 1

GroupAggregate (cost=45,887.97..45,888.06 rows=1 width=129) (actual time=13,356.740..13,356.776 rows=2 loops=1)

  • Group Key: t7._fld18299rref, t7._fld18301rref, t7._fld18300rref
  • Filter: (((sum(CASE WHEN (t7._recordkind = '0'::numeric) THEN (- t7._fld18302) ELSE t7._fld18302 END))::numeric(27,3) <> '0'::numeric) OR ((sum(CASE WHEN (t7._recordkind = '0'::numeric) THEN (- t7._fld18304) ELSE t7._fld18304 END))::numeric(27,3) <> '0'::numeric) OR ((sum(CASE WHEN (t7._recordkind = '0'::numeric) THEN (- t7._fld18305) ELSE t7._fld18305 END))::numeric(27,3) <> '0'::numeric))
17. 0.100 13,356.672 ↓ 82.0 82 1

Sort (cost=45,887.97..45,887.98 rows=1 width=71) (actual time=13,356.657..13,356.672 rows=82 loops=1)

  • Sort Key: t7._fld18299rref, t7._fld18301rref, t7._fld18300rref
  • Sort Method: quicksort Memory: 36kB
18. 0.035 13,356.572 ↓ 82.0 82 1

Nested Loop (cost=1.72..45,887.96 rows=1 width=71) (actual time=6,370.897..13,356.572 rows=82 loops=1)

19. 0.004 0.015 ↑ 1.0 2 1

Unique (cost=1.03..1.05 rows=2 width=68) (actual time=0.009..0.015 rows=2 loops=1)

20. 0.008 0.011 ↑ 1.0 2 1

Sort (cost=1.03..1.03 rows=2 width=68) (actual time=0.008..0.011 rows=2 loops=1)

  • Sort Key: t8._q_000_f_000rref, t8._q_000_f_001rref, t8._q_000_f_002rref, t8._q_000_f_003rref
  • Sort Method: quicksort Memory: 25kB
21. 0.003 0.003 ↑ 1.0 2 1

Seq Scan on tt115 t8 (cost=0.00..1.02 rows=2 width=68) (actual time=0.002..0.003 rows=2 loops=1)

22. 13,356.522 13,356.522 ↓ 41.0 41 2

Index Scan using _accumrg18298_bydims18307_rtrn on _accumrg18298 t7 (cost=0.69..22,943.44 rows=1 width=90) (actual time=6,669.833..6,678.261 rows=41 loops=2)

  • Index Cond: ((_fld775 = '0'::numeric) AND (_fld18300rref = t8._q_000_f_001rref) AND (_period < '3999-11-01 00:00:00'::timestamp without time zone))
  • Filter: (_active AND (t8._q_000_f_000rref = _fld18299rref) AND (t8._q_000_f_002rref = _fld18301rref) AND (t8._q_000_f_003rref = _fld21963rref) AND ((_period > '2019-02-09 23:59:59'::timestamp without time zone) OR ((_period = '2019-02-09 23:59:59'::timestamp without time zone) AND ((_recordertref > '\\x00000136'::bytea) OR ((_recordertref = '\\x00000136'::bytea) AND (_recorderrref > '\\x80e70050569c598211e92d169827cb41'::bytea))))))
  • Rows Removed by Filter: 11614395
23. 0.001 0.012 ↑ 1.0 2 2

Materialize (cost=0.00..1.03 rows=2 width=76) (actual time=0.005..0.006 rows=2 loops=2)

24. 0.011 0.011 ↑ 1.0 2 1

Seq Scan on tt115 t2 (cost=0.00..1.02 rows=2 width=76) (actual time=0.009..0.011 rows=2 loops=1)

25. 0.022 0.022 ↑ 1.0 1 2

Index Scan using _reference154hpk on _reference154 t9 (cost=0.41..2.83 rows=1 width=38) (actual time=0.011..0.011 rows=1 loops=2)

  • Index Cond: ((_fld775 = '0'::numeric) AND (_idrref = t2._q_000_f_000rref))
26. 0.000 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.70..3.20 rows=1 width=220) (actual time=0.005..0.005 rows=0 loops=1)

  • Join Filter: ((t10._q_001_f_000rref = t11._fld15508rref) AND (t10._q_001_f_001rref = t11._fld15509rref) AND (t10._q_001_f_002rref = t11._fld15510rref) AND (t10._q_001_f_004 = t11._fld15511))
27. 0.001 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.41..2.84 rows=1 width=105) (actual time=0.005..0.005 rows=0 loops=1)

28. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on tt116 t10 (cost=0.00..0.00 rows=1 width=67) (actual time=0.004..0.004 rows=0 loops=1)

29. 0.000 0.000 ↓ 0.0 0

Index Scan using _reference154hpk on _reference154 t12 (cost=0.41..2.83 rows=1 width=38) (never executed)

  • Index Cond: ((_fld775 = '0'::numeric) AND (_idrref = t10._q_001_f_000rref))
30. 0.000 0.000 ↓ 0.0 0

Index Scan using _inforg15507_bydims_rrrt on _inforg15507 t11 (cost=0.28..0.33 rows=2 width=65) (never executed)

  • Index Cond: ((_fld775 = '0'::numeric) AND (_fld15508rref = t12._idrref))