explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w2S5

Settings
# exclusive inclusive rows x rows loops node
1. 0.781 44,193.418 ↓ 41.0 246 1

GroupAggregate (cost=5,560.44..5,560.58 rows=6 width=190) (actual time=44,192.577..44,193.418 rows=246 loops=1)

  • Group Key: t2.fld14918rref, t2.fld14919_type, t2.fld14919_rtref, t2.fld14919_rrref, t2.fld14920rref, t2.fld14921rref, t2.fld14922rref, t2.fld14923rref, t2.fld14924rref
2. 3.063 44,192.637 ↓ 61.2 367 1

Sort (cost=5,560.44..5,560.45 rows=6 width=190) (actual time=44,192.557..44,192.637 rows=367 loops=1)

  • Sort Key: t2.fld14918rref, t2.fld14919_type, t2.fld14919_rtref, t2.fld14919_rrref, t2.fld14920rref, t2.fld14921rref, t2.fld14922rref, t2.fld14923rref, t2.fld14924rref
  • Sort Method: quicksort Memory: 122kB
3. 0.133 44,189.574 ↓ 61.2 367 1

Append (cost=71.28..5,560.41 rows=6 width=190) (actual time=44,168.311..44,189.574 rows=367 loops=1)

4. 0.001 0.225 ↓ 0.0 0 1

GroupAggregate (cost=71.28..71.33 rows=2 width=190) (actual time=0.225..0.225 rows=0 loops=1)

  • Group Key: t2.fld14918rref, t2.fld14919_type, t2.fld14919_rtref, t2.fld14919_rrref, t2.fld14920rref, t2.fld14921rref, t2.fld14922rref, t2.fld14923rref, t2.fld14924rref
5. 0.005 0.224 ↓ 0.0 0 1

Sort (cost=71.28..71.28 rows=2 width=190) (actual time=0.224..0.224 rows=0 loops=1)

  • Sort Key: t2.fld14918rref, t2.fld14919_type, t2.fld14919_rtref, t2.fld14919_rrref, t2.fld14920rref, t2.fld14921rref, t2.fld14922rref, t2.fld14923rref, t2.fld14924rref
  • Sort Method: quicksort Memory: 25kB
6. 0.001 0.219 ↓ 0.0 0 1

Subquery Scan on t2 (cost=71.20..71.27 rows=2 width=190) (actual time=0.219..0.219 rows=0 loops=1)

7. 0.001 0.218 ↓ 0.0 0 1

GroupAggregate (cost=71.20..71.25 rows=2 width=190) (actual time=0.218..0.218 rows=0 loops=1)

  • Group Key: t4._fld14924rref, t4._fld14923rref, t4._fld14921rref, t4._fld14919_type, t4._fld14919_rtref, t4._fld14919_rrref, t4._fld14922rref, t4._fld14920rref, t4._fld14918rref
  • Filter: ((sum((sum(t4._fld14926))) <> '0'::numeric) OR (sum((sum(t4._fld14925))) <> '0'::numeric))
8. 0.006 0.217 ↓ 0.0 0 1

Sort (cost=71.20..71.20 rows=2 width=190) (actual time=0.217..0.217 rows=0 loops=1)

  • Sort Key: t4._fld14924rref, t4._fld14923rref, t4._fld14921rref, t4._fld14919_type, t4._fld14919_rtref, t4._fld14919_rrref, t4._fld14922rref, t4._fld14920rref, t4._fld14918rref
  • Sort Method: quicksort Memory: 25kB
9. 0.000 0.211 ↓ 0.0 0 1

Append (cost=16.64..71.19 rows=2 width=190) (actual time=0.211..0.211 rows=0 loops=1)

10. 0.000 0.111 ↓ 0.0 0 1

GroupAggregate (cost=16.64..16.67 rows=1 width=190) (actual time=0.111..0.111 rows=0 loops=1)

  • Group Key: t4._fld14924rref, t4._fld14923rref, t4._fld14921rref, t4._fld14919_type, t4._fld14919_rtref, t4._fld14919_rrref, t4._fld14922rref, t4._fld14920rref, t4._fld14918rref
  • Filter: ((sum(t4._fld14926) <> '0'::numeric) OR (sum(t4._fld14925) <> '0'::numeric))
11. 0.006 0.111 ↓ 0.0 0 1

Sort (cost=16.64..16.64 rows=1 width=134) (actual time=0.111..0.111 rows=0 loops=1)

  • Sort Key: t4._fld14924rref, t4._fld14923rref, t4._fld14921rref, t4._fld14919_type, t4._fld14919_rtref, t4._fld14919_rrref, t4._fld14922rref, t4._fld14920rref, t4._fld14918rref
  • Sort Method: quicksort Memory: 25kB
12. 0.001 0.105 ↓ 0.0 0 1

Nested Loop (cost=13.58..16.64 rows=1 width=134) (actual time=0.105..0.105 rows=0 loops=1)

13. 0.001 0.104 ↓ 0.0 0 1

Unique (cost=13.36..13.37 rows=1 width=119) (actual time=0.104..0.104 rows=0 loops=1)

14. 0.008 0.103 ↓ 0.0 0 1

Sort (cost=13.36..13.36 rows=1 width=119) (actual time=0.103..0.103 rows=0 loops=1)

  • Sort Key: t5._q_001_f_022rref, (CASE WHEN (t5._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END), (CASE WHEN (t5._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END), t5._q_001_f_024rref, t5._q_001_f_028rref, t5._q_001_f_030rref, t5._q_001_f_034rref, t5._q_001_f_036rref, t5._q_001_f_038rref
  • Sort Method: quicksort Memory: 25kB
15. 0.095 0.095 ↓ 0.0 0 1

Seq Scan on tt21 t5 (cost=0.00..13.35 rows=1 width=119) (actual time=0.095..0.095 rows=0 loops=1)

  • Filter: (_q_001_f_038rref <> '\\x00000000000000000000000000000000'::bytea)
  • Rows Removed by Filter: 123
16. 0.000 0.000 ↓ 0.0 0

Index Scan using _accumrgt14948_2 on _accumrgt14948 t4 (cost=0.23..3.26 rows=1 width=134) (never executed)

  • Index Cond: ((_fld734 = '382004'::numeric) AND (_period = '2019-01-01 00:00:00'::timestamp without time zone) AND (_fld14921rref = t5._q_001_f_030rref))
  • Filter: ((t5._q_001_f_022rref = _fld14918rref) AND (t5._q_001_f_028rref = _fld14920rref) AND (t5._q_001_f_034rref = _fld14922rref) AND (t5._q_001_f_036rref = _fld14923rref) AND (t5._q_001_f_038rref = _fld14924rref) AND ((_fld14926 <> '0'::numeric) OR (_fld14925 <> '0'::numeric)) AND ((_fld14926 <> '0'::numeric) OR (_fld14925 <> '0'::numeric)) AND (CASE WHEN (t5._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN _fld14919_type ELSE NULL::bytea END) AND (CASE WHEN (t5._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rtref WHEN (_fld14919_type = '\\x01'::bytea) THEN '\\x00000000'::bytea ELSE NULL::bytea END) AND (t5._q_001_f_024rref = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rrref WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN '\\x00000000000000000000000000000000'::bytea ELSE NULL::bytea END))
17. 0.001 0.100 ↓ 0.0 0 1

GroupAggregate (cost=54.46..54.50 rows=1 width=174) (actual time=0.100..0.100 rows=0 loops=1)

  • Group Key: t6._fld14924rref, t6._fld14923rref, t6._fld14921rref, t6._fld14919_type, t6._fld14919_rtref, t6._fld14919_rrref, t6._fld14922rref, t6._fld14920rref, t6._fld14918rref
  • Filter: (((sum(CASE WHEN (t6._recordkind = '0'::numeric) THEN (- t6._fld14926) ELSE t6._fld14926 END))::numeric(27,2) <> '0'::numeric) OR ((sum(CASE WHEN (t6._recordkind = '0'::numeric) THEN (- t6._fld14925) ELSE t6._fld14925 END))::numeric(27,3) <> '0'::numeric))
18. 0.006 0.099 ↓ 0.0 0 1

Sort (cost=54.46..54.47 rows=1 width=140) (actual time=0.099..0.099 rows=0 loops=1)

  • Sort Key: t6._fld14924rref, t6._fld14923rref, t6._fld14921rref, t6._fld14919_type, t6._fld14919_rtref, t6._fld14919_rrref, t6._fld14922rref, t6._fld14920rref, t6._fld14918rref
  • Sort Method: quicksort Memory: 25kB
19. 0.001 0.093 ↓ 0.0 0 1

Nested Loop (cost=13.58..54.46 rows=1 width=140) (actual time=0.093..0.093 rows=0 loops=1)

20. 0.000 0.092 ↓ 0.0 0 1

Unique (cost=13.36..13.37 rows=1 width=119) (actual time=0.092..0.092 rows=0 loops=1)

21. 0.005 0.092 ↓ 0.0 0 1

Sort (cost=13.36..13.36 rows=1 width=119) (actual time=0.092..0.092 rows=0 loops=1)

  • Sort Key: t7._q_001_f_022rref, (CASE WHEN (t7._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END), (CASE WHEN (t7._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END), t7._q_001_f_024rref, t7._q_001_f_028rref, t7._q_001_f_030rref, t7._q_001_f_034rref, t7._q_001_f_036rref, t7._q_001_f_038rref
  • Sort Method: quicksort Memory: 25kB
22. 0.087 0.087 ↓ 0.0 0 1

Seq Scan on tt21 t7 (cost=0.00..13.35 rows=1 width=119) (actual time=0.087..0.087 rows=0 loops=1)

  • Filter: (_q_001_f_038rref <> '\\x00000000000000000000000000000000'::bytea)
  • Rows Removed by Filter: 123
23. 0.000 0.000 ↓ 0.0 0

Index Scan using _accumrg14917_3 on _accumrg14917 t6 (cost=0.23..41.08 rows=1 width=140) (never executed)

  • Index Cond: ((_fld734 = '382004'::numeric) AND (_fld14921rref = t7._q_001_f_030rref) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone))
  • Filter: (_active AND (t7._q_001_f_022rref = _fld14918rref) AND (t7._q_001_f_028rref = _fld14920rref) AND (t7._q_001_f_034rref = _fld14922rref) AND (t7._q_001_f_036rref = _fld14923rref) AND (t7._q_001_f_038rref = _fld14924rref) AND (CASE WHEN (t7._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN _fld14919_type ELSE NULL::bytea END) AND (CASE WHEN (t7._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rtref WHEN (_fld14919_type = '\\x01'::bytea) THEN '\\x00000000'::bytea ELSE NULL::bytea END) AND (t7._q_001_f_024rref = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rrref WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN '\\x00000000000000000000000000000000'::bytea ELSE NULL::bytea END) AND ((_period > '2018-12-06 09:21:56'::timestamp without time zone) OR ((_period = '2018-12-06 09:21:56'::timestamp without time zone) AND ((_recordertref > '\\x0000013d'::bytea) OR ((_recordertref = '\\x0000013d'::bytea) AND (_recorderrref > '\\x0285005056899a2911e8f91f3b2d17dc'::bytea))))))
24. 0.317 44,168.417 ↓ 60.5 121 1

GroupAggregate (cost=5,484.22..5,484.27 rows=2 width=190) (actual time=44,168.085..44,168.417 rows=121 loops=1)

  • Group Key: t8.fld14918rref, t8.fld14919_type, t8.fld14919_rtref, t8.fld14919_rrref, t8.fld14920rref, t8.fld14921rref, t8.fld14922rref, t8.fld14923rref, t8.fld14924rref
25. 0.251 44,168.100 ↓ 60.5 121 1

Sort (cost=5,484.22..5,484.23 rows=2 width=190) (actual time=44,168.075..44,168.100 rows=121 loops=1)

  • Sort Key: t8.fld14918rref, t8.fld14919_type, t8.fld14919_rtref, t8.fld14919_rrref, t8.fld14920rref, t8.fld14921rref, t8.fld14922rref, t8.fld14923rref, t8.fld14924rref
  • Sort Method: quicksort Memory: 57kB
26. 0.064 44,167.849 ↓ 60.5 121 1

Subquery Scan on t8 (cost=5,484.14..5,484.22 rows=2 width=190) (actual time=44,167.126..44,167.849 rows=121 loops=1)

27. 0.609 44,167.785 ↓ 60.5 121 1

GroupAggregate (cost=5,484.14..5,484.20 rows=2 width=190) (actual time=44,167.124..44,167.785 rows=121 loops=1)

  • Group Key: t10._fld14924rref, t10._fld14923rref, t10._fld14921rref, t10._fld14919_type, t10._fld14919_rtref, t10._fld14919_rrref, t10._fld14922rref, t10._fld14920rref, t10._fld14918rref
  • Filter: ((sum((sum(t10._fld14926))) <> '0'::numeric) OR (sum((sum(t10._fld14925))) <> '0'::numeric))
  • Rows Removed by Filter: 2
28. 1.081 44,167.176 ↓ 114.0 228 1

Sort (cost=5,484.14..5,484.15 rows=2 width=190) (actual time=44,167.106..44,167.176 rows=228 loops=1)

  • Sort Key: t10._fld14924rref, t10._fld14923rref, t10._fld14921rref, t10._fld14919_type, t10._fld14919_rtref, t10._fld14919_rrref, t10._fld14922rref, t10._fld14920rref, t10._fld14918rref
  • Sort Method: quicksort Memory: 85kB
29. 0.063 44,166.095 ↓ 114.0 228 1

Append (cost=417.66..5,484.14 rows=2 width=190) (actual time=5.345..44,166.095 rows=228 loops=1)

30. 0.209 5.559 ↓ 120.0 120 1

GroupAggregate (cost=417.66..417.69 rows=1 width=190) (actual time=5.344..5.559 rows=120 loops=1)

  • Group Key: t10._fld14924rref, t10._fld14923rref, t10._fld14921rref, t10._fld14919_type, t10._fld14919_rtref, t10._fld14919_rrref, t10._fld14922rref, t10._fld14920rref, t10._fld14918rref
  • Filter: ((sum(t10._fld14926) <> '0'::numeric) OR (sum(t10._fld14925) <> '0'::numeric))
31. 0.224 5.350 ↓ 120.0 120 1

Sort (cost=417.66..417.66 rows=1 width=134) (actual time=5.335..5.350 rows=120 loops=1)

  • Sort Key: t10._fld14923rref, t10._fld14921rref, t10._fld14919_type, t10._fld14919_rtref, t10._fld14919_rrref, t10._fld14922rref, t10._fld14920rref, t10._fld14918rref
  • Sort Method: quicksort Memory: 56kB
32. 0.108 5.126 ↓ 120.0 120 1

Nested Loop (cost=14.44..417.65 rows=1 width=134) (actual time=0.224..5.126 rows=120 loops=1)

33. 0.148 0.221 ↑ 1.0 123 1

HashAggregate (cost=14.21..15.44 rows=123 width=102) (actual time=0.163..0.221 rows=123 loops=1)

  • Group Key: t11._q_001_f_022rref, CASE WHEN (t11._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END, CASE WHEN (t11._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END, t11._q_001_f_024rref, t11._q_001_f_028rref, t11._q_001_f_030rref, t11._q_001_f_034rref, t11._q_001_f_036rref
34. 0.073 0.073 ↑ 1.0 123 1

Seq Scan on tt21 t11 (cost=0.00..13.23 rows=123 width=102) (actual time=0.005..0.073 rows=123 loops=1)

35. 4.797 4.797 ↑ 1.0 1 123

Index Scan using _accumrgt14948_2 on _accumrgt14948 t10 (cost=0.23..3.26 rows=1 width=134) (actual time=0.026..0.039 rows=1 loops=123)

  • Index Cond: ((_fld734 = '382004'::numeric) AND (_period = '2019-01-01 00:00:00'::timestamp without time zone) AND (_fld14921rref = t11._q_001_f_030rref))
  • Filter: ((_fld14924rref = '\\x00000000000000000000000000000000'::bytea) AND (t11._q_001_f_022rref = _fld14918rref) AND (t11._q_001_f_028rref = _fld14920rref) AND (t11._q_001_f_034rref = _fld14922rref) AND (t11._q_001_f_036rref = _fld14923rref) AND ((_fld14926 <> '0'::numeric) OR (_fld14925 <> '0'::numeric)) AND ((_fld14926 <> '0'::numeric) OR (_fld14925 <> '0'::numeric)) AND (CASE WHEN (t11._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN _fld14919_type ELSE NULL::bytea END) AND (CASE WHEN (t11._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rtref WHEN (_fld14919_type = '\\x01'::bytea) THEN '\\x00000000'::bytea ELSE NULL::bytea END) AND (t11._q_001_f_024rref = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rrref WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN '\\x00000000000000000000000000000000'::bytea ELSE NULL::bytea END))
  • Rows Removed by Filter: 8
36. 1.456 44,160.473 ↓ 108.0 108 1

GroupAggregate (cost=5,066.39..5,066.43 rows=1 width=174) (actual time=44,158.889..44,160.473 rows=108 loops=1)

  • Group Key: t12._fld14924rref, t12._fld14923rref, t12._fld14921rref, t12._fld14919_type, t12._fld14919_rtref, t12._fld14919_rrref, t12._fld14922rref, t12._fld14920rref, t12._fld14918rref
  • Filter: (((sum(CASE WHEN (t12._recordkind = '0'::numeric) THEN (- t12._fld14926) ELSE t12._fld14926 END))::numeric(27,2) <> '0'::numeric) OR ((sum(CASE WHEN (t12._recordkind = '0'::numeric) THEN (- t12._fld14925) ELSE t12._fld14925 END))::numeric(27,3) <> '0'::numeric))
37. 5.087 44,159.017 ↓ 799.0 799 1

Sort (cost=5,066.39..5,066.40 rows=1 width=140) (actual time=44,158.846..44,159.017 rows=799 loops=1)

  • Sort Key: t12._fld14923rref, t12._fld14921rref, t12._fld14919_type, t12._fld14919_rtref, t12._fld14919_rrref, t12._fld14922rref, t12._fld14920rref, t12._fld14918rref
  • Sort Method: quicksort Memory: 237kB
38. 1.780 44,153.930 ↓ 799.0 799 1

Nested Loop (cost=14.44..5,066.39 rows=1 width=140) (actual time=3.027..44,153.930 rows=799 loops=1)

39. 0.839 0.931 ↑ 1.0 123 1

HashAggregate (cost=14.21..15.44 rows=123 width=102) (actual time=0.182..0.931 rows=123 loops=1)

  • Group Key: t13._q_001_f_022rref, CASE WHEN (t13._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END, CASE WHEN (t13._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END, t13._q_001_f_024rref, t13._q_001_f_028rref, t13._q_001_f_030rref, t13._q_001_f_034rref, t13._q_001_f_036rref
40. 0.092 0.092 ↑ 1.0 123 1

Seq Scan on tt21 t13 (cost=0.00..13.23 rows=123 width=102) (actual time=0.008..0.092 rows=123 loops=1)

41. 44,151.219 44,151.219 ↓ 6.0 6 123

Index Scan using _accumrg14917_3 on _accumrg14917 t12 (cost=0.23..41.05 rows=1 width=140) (actual time=353.822..358.953 rows=6 loops=123)

  • Index Cond: ((_fld734 = '382004'::numeric) AND (_fld14921rref = t13._q_001_f_030rref) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone))
  • Filter: (_active AND (_fld14924rref = '\\x00000000000000000000000000000000'::bytea) AND (t13._q_001_f_022rref = _fld14918rref) AND (t13._q_001_f_028rref = _fld14920rref) AND (t13._q_001_f_034rref = _fld14922rref) AND (t13._q_001_f_036rref = _fld14923rref) AND (CASE WHEN (t13._q_001_f_024rref IS NOT NULL) THEN '\\x08'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN _fld14919_type ELSE NULL::bytea END) AND (CASE WHEN (t13._q_001_f_024rref IS NOT NULL) THEN '\\x000000d1'::bytea ELSE NULL::bytea END = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rtref WHEN (_fld14919_type = '\\x01'::bytea) THEN '\\x00000000'::bytea ELSE NULL::bytea END) AND (t13._q_001_f_024rref = CASE WHEN (_fld14919_type = '\\x08'::bytea) THEN _fld14919_rrref WHEN (_fld14919_type = ANY ('{"\\\\x01","\\\\x08"}'::bytea[])) THEN '\\x00000000000000000000000000000000'::bytea ELSE NULL::bytea END) AND ((_period > '2018-12-06 09:21:56'::timestamp without time zone) OR ((_period = '2018-12-06 09:21:56'::timestamp without time zone) AND ((_recordertref > '\\x0000013d'::bytea) OR ((_recordertref = '\\x0000013d'::bytea) AND (_recorderrref > '\\x0285005056899a2911e8f91f3b2d17dc'::bytea))))))
  • Rows Removed by Filter: 1120
42. 20.799 20.799 ↓ 123.0 246 1

Index Scan using _accumrg14917_2 on _accumrg14917 t14 (cost=0.23..4.75 rows=2 width=186) (actual time=19.212..20.799 rows=246 loops=1)

  • Index Cond: ((_fld734 = '382004'::numeric) AND (_recordertref = '\\x0000013d'::bytea) AND (_recorderrref = '\\x0285005056899a2911e8f91f3b2d17dc'::bytea))
  • Filter: (_period <= '2018-12-06 09:21:56'::timestamp without time zone)