explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GVLH

Settings
# exclusive inclusive rows x rows loops node
1. 0.052 276,661.599 ↓ 15.0 15 1

GroupAggregate (cost=40.61..40.67 rows=1 width=431) (actual time=276,661.563..276,661.599 rows=15 loops=1)

  • Group Key: t1.accountrref, t1.fld1189rref, t1.value1_type, t1.value1_rtref, t1.value1_rrref, t1.value2_type, t1.value2_rtref, t1.value2_rrref, t1.value3_type, t1.value3_rtref, t1.value3_rrref, t1.fld1187rref
2. 0.035 276,661.547 ↓ 15.0 15 1

Sort (cost=40.61..40.61 rows=1 width=295) (actual time=276,661.545..276,661.547 rows=15 loops=1)

  • Sort Key: t1.accountrref, t1.fld1189rref, t1.value1_type, t1.value1_rtref, t1.value1_rrref, t1.value2_type, t1.value2_rtref, t1.value2_rrref, t1.value3_type, t1.value3_rtref, t1.value3_rrref, t1.fld1187rref
  • Sort Method: quicksort Memory: 28kB
3. 0.004 276,661.512 ↓ 15.0 15 1

Subquery Scan on t1 (cost=40.48..40.61 rows=1 width=295) (actual time=276,660.910..276,661.512 rows=15 loops=1)

4. 0.672 276,661.508 ↓ 15.0 15 1

GroupAggregate (cost=40.48..40.60 rows=1 width=327) (actual time=276,660.909..276,661.508 rows=15 loops=1)

  • Group Key: t3._accountrref, t3._value1_type, t3._value1_rtref, t3._value1_rrref, t3._value2_type, t3._value2_rtref, t3._value2_rrref, t3._value3_type, t3._value3_rtref, t3._value3_rrref, t3._fld1187rref, t3._fld1189rref
  • Filter: ((CASE WHEN (sum(t3._fld1190) IS NULL) THEN '0'::numeric WHEN ((max(t13._kind) = '0'::numeric) OR ((max(t13._kind) = '2'::numeric) AND (sum(t3._fld1190) > '0'::numeric))) THEN sum(t3._fld1190) ELSE '0'::numeric END <> '0'::numeric) OR (CASE WHEN (sum(t3._fld1192) IS NULL) THEN '0'::numeric WHEN ((max(t13._kind) = '0'::numeric) OR ((max(t13._kind) = '2'::numeric) AND (sum(t3._fld1192) > '0'::numeric))) THEN sum(t3._fld1192) ELSE '0'::numeric END <> '0'::numeric) OR (CASE WHEN (sum(t3._fld1193) IS NULL) THEN '0'::numeric WHEN ((max(t13._kind) = '0'::numeric) OR ((max(t13._kind) = '2'::numeric) AND (sum(t3._fld1193) > '0'::numeric))) THEN sum(t3._fld1193) ELSE '0'::numeric END <> '0'::numeric) OR (CASE WHEN (sum(t3._fld1195) IS NULL) THEN '0'::numeric WHEN ((max(t13._kind) = '0'::numeric) OR ((max(t13._kind) = '2'::numeric) AND (sum(t3._fld1195) > '0'::numeric))) THEN sum(t3._fld1195) ELSE '0'::numeric END <> '0'::numeric) OR (CASE WHEN (sum(t3._fld1194) IS NULL) THEN '0'::numeric WHEN ((max(t13._kind) = '0'::numeric) OR ((max(t13._kind) = '2'::numeric) AND (sum(t3._fld1194) > '0'::numeric))) THEN sum(t3._fld1194) ELSE '0'::numeric END <> '0'::numeric))
  • Rows Removed by Filter: 77
5. 4.478 276,660.836 ↓ 517.0 517 1

Sort (cost=40.48..40.48 rows=1 width=212) (actual time=276,660.801..276,660.836 rows=517 loops=1)

  • Sort Key: t3._accountrref, t3._value1_type, t3._value1_rtref, t3._value1_rrref, t3._value2_type, t3._value2_rtref, t3._value2_rrref, t3._value3_type, t3._value3_rtref, t3._value3_rrref, t3._fld1187rref, t3._fld1189rref
  • Sort Method: quicksort Memory: 162kB
6. 2.288 276,656.358 ↓ 517.0 517 1

Nested Loop (cost=0.45..40.48 rows=1 width=212) (actual time=1.677..276,656.358 rows=517 loops=1)

7. 0.380 276,647.866 ↓ 172.3 517 1

Append (cost=0.28..30.90 rows=3 width=211) (actual time=1.656..276,647.866 rows=517 loops=1)

8. 0.022 7.287 ↓ 77.0 77 1

Nested Loop (cost=0.28..4.33 rows=1 width=142) (actual time=1.656..7.287 rows=77 loops=1)

9. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on tt79 t4 (cost=0.00..1.01 rows=1 width=17) (actual time=0.010..0.011 rows=1 loops=1)

  • Filter: ((_lineno1 = '1'::numeric) AND (_lineno2 = '2'::numeric) AND (_lineno3 = '3'::numeric) AND (_cnt = '3'::numeric))
10. 7.254 7.254 ↓ 77.0 77 1

Index Scan using _accrgat31221_byperiodo on _accrgat31221 t3 (cost=0.28..3.31 rows=1 width=142) (actual time=1.644..7.254 rows=77 loops=1)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_accountrref = t4._idrref) AND (_period = '2019-01-01 00:00:00'::timestamp without time zone) AND (_fld1187rref = '\\x2a970050568941c111e7d431c4c4639c'::bytea))
  • Filter: ((_value1_type = '\\x08'::bytea) AND (_value3_type = '\\x08'::bytea) AND (_value1_rtref = '\\x0000008f'::bytea) AND (_value3_rtref = '\\x000000fe'::bytea) AND (_value3_rrref = '\\x8a80c4346b563d4511e49bca46ac6b73'::bytea) AND (_value1_rrref = ANY ('{"\\\\x80ed704d7b898f0611e8cde07c6b8155","\\\\x80ed704d7b898f0611e8c7b7101dfb65","\\\\x80ed704d7b898f0611e8f391608c7a67","\\\\xbe92d850e6e2775111e4d45566fd506e","\\\\x80ea704d7b898f0611e83956a527a059","\\\\x80ed704d7b898f0611e8e34bcae9b61d","\\\\x8114fcaa1429c85911e6c0f7c1c06cc1"}'::bytea[])) AND ((_fld1190 <> '0'::numeric) OR (_fld1192 <> '0'::numeric) OR (_fld1193 <> '0'::numeric) OR (_fld1195 <> '0'::numeric) OR (_fld1194 <> '0'::numeric)))
  • Rows Removed by Filter: 2767
11. 5.647 30,118.391 ↓ 43.0 43 1

Nested Loop (cost=1.06..13.27 rows=1 width=245) (actual time=1,198.005..30,118.391 rows=43 loops=1)

  • Join Filter: ((t6._recordertref = t8._recordertref) AND (t6._recorderrref = t8._recorderrref) AND (t6._lineno = t8._lineno) AND (t6._period = t8._period))
  • Rows Removed by Join Filter: 40159
12. 0.433 29,150.978 ↓ 71.0 71 1

Nested Loop (cost=0.78..9.92 rows=1 width=250) (actual time=680.700..29,150.978 rows=71 loops=1)

13. 29.498 28,970.915 ↓ 71.0 71 1

Nested Loop (cost=0.50..6.60 rows=1 width=181) (actual time=680.630..28,970.915 rows=71 loops=1)

  • Join Filter: ((t5._recordertref = t6._recordertref) AND (t5._recorderrref = t6._recorderrref) AND (t5._lineno = t6._lineno) AND (t5._period = t6._period))
  • Rows Removed by Join Filter: 95850
14. 35.001 35.001 ↓ 1,386.0 1,386 1

Index Scan using _accrg1186_byperiod on _accrg1186 t5 (cost=0.23..3.25 rows=1 width=112) (actual time=0.725..35.001 rows=1,386 loops=1)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_fld1173 = '736876'::numeric) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone))
  • Filter: (_active AND (_accountdtrref <> '\\x00000000000000000000000000000000'::bytea) AND (_accountdtrref = '\\xa24cc86000be40ca11e7ba1e12fda572'::bytea) AND (_fld1187rref = '\\x2a970050568941c111e7d431c4c4639c'::bytea) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 17194
15. 28,906.416 28,906.416 ↓ 69.0 69 1,386

Index Scan using _accrged1223_byperiod on _accrged1223 t6 (cost=0.28..3.33 rows=1 width=69) (actual time=0.868..20.856 rows=69 loops=1,386)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_fld1173 = '736876'::numeric) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda500'::bytea) AND (_correspond = '0'::numeric))
  • Filter: ((_value_type = '\\x08'::bytea) AND (_value_rtref = '\\x0000008f'::bytea) AND (_value_rrref = ANY ('{"\\\\x80ed704d7b898f0611e8cde07c6b8155","\\\\x80ed704d7b898f0611e8c7b7101dfb65","\\\\x80ed704d7b898f0611e8f391608c7a67","\\\\xbe92d850e6e2775111e4d45566fd506e","\\\\x80ea704d7b898f0611e83956a527a059","\\\\x80ed704d7b898f0611e8e34bcae9b61d","\\\\x8114fcaa1429c85911e6c0f7c1c06cc1"}'::bytea[])) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 1338
16. 179.630 179.630 ↑ 1.0 1 71

Index Scan using _accrged1223_byrecorder on _accrged1223 t7 (cost=0.28..3.30 rows=1 width=69) (actual time=2.530..2.530 rows=1 loops=71)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_recordertref = t6._recordertref) AND (_recorderrref = t6._recorderrref) AND (_lineno = t6._lineno) AND (_correspond = '0'::numeric))
  • Filter: ((_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda507'::bytea) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda507'::bytea) AND (t6._period = _period) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 1
17. 961.766 961.766 ↓ 566.0 566 71

Index Scan using _accrged1223_byperiod on _accrged1223 t8 (cost=0.28..3.33 rows=1 width=69) (actual time=0.363..13.546 rows=566 loops=71)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_fld1173 = '736876'::numeric) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda512'::bytea) AND (_correspond = '0'::numeric))
  • Filter: ((_value_type = '\\x08'::bytea) AND (_value_rtref = '\\x000000fe'::bytea) AND (_value_rrref = '\\x8a80c4346b563d4511e49bca46ac6b73'::bytea) AND (_value_type = '\\x08'::bytea) AND (_value_rtref = '\\x000000fe'::bytea) AND (_value_rrref = '\\x8a80c4346b563d4511e49bca46ac6b73'::bytea) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 389
18. 307.241 246,521.808 ↓ 397.0 397 1

Nested Loop (cost=1.06..13.26 rows=1 width=245) (actual time=0.126..246,521.808 rows=397 loops=1)

  • Join Filter: ((t10._recordertref = t12._recordertref) AND (t10._recorderrref = t12._recorderrref) AND (t10._lineno = t12._lineno) AND (t10._period = t12._period))
  • Rows Removed by Join Filter: 2479973
19. 4.434 231,624.733 ↓ 798.0 798 1

Nested Loop (cost=0.78..9.92 rows=1 width=251) (actual time=0.110..231,624.733 rows=798 loops=1)

20. 1,625.059 231,051.325 ↓ 798.0 798 1

Nested Loop (cost=0.50..6.60 rows=1 width=182) (actual time=0.067..231,051.325 rows=798 loops=1)

  • Join Filter: ((t9._recordertref = t10._recordertref) AND (t9._recorderrref = t10._recorderrref) AND (t9._lineno = t10._lineno) AND (t9._period = t10._period))
  • Rows Removed by Join Filter: 11613392
21. 36.966 36.966 ↓ 7,950.0 7,950 1

Index Scan using _accrg1186_byperiod on _accrg1186 t9 (cost=0.23..3.25 rows=1 width=113) (actual time=0.027..36.966 rows=7,950 loops=1)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_fld1173 = '736876'::numeric) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone))
  • Filter: (_active AND (_accountctrref <> '\\x00000000000000000000000000000000'::bytea) AND (_accountctrref = '\\xa24cc86000be40ca11e7ba1e12fda572'::bytea) AND (_fld1187rref = '\\x2a970050568941c111e7d431c4c4639c'::bytea) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 10630
22. 229,389.300 229,389.300 ↓ 1,461.0 1,461 7,950

Index Scan using _accrged1223_byperiod on _accrged1223 t10 (cost=0.28..3.33 rows=1 width=69) (actual time=0.021..28.854 rows=1,461 loops=7,950)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_fld1173 = '736876'::numeric) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda500'::bytea) AND (_correspond = '1'::numeric))
  • Filter: ((_value_type = '\\x08'::bytea) AND (_value_rtref = '\\x0000008f'::bytea) AND (_value_rrref = ANY ('{"\\\\x80ed704d7b898f0611e8cde07c6b8155","\\\\x80ed704d7b898f0611e8c7b7101dfb65","\\\\x80ed704d7b898f0611e8f391608c7a67","\\\\xbe92d850e6e2775111e4d45566fd506e","\\\\x80ea704d7b898f0611e83956a527a059","\\\\x80ed704d7b898f0611e8e34bcae9b61d","\\\\x8114fcaa1429c85911e6c0f7c1c06cc1"}'::bytea[])) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 12221
23. 568.974 568.974 ↑ 1.0 1 798

Index Scan using _accrged1223_byrecorder on _accrged1223 t11 (cost=0.28..3.30 rows=1 width=69) (actual time=0.713..0.713 rows=1 loops=798)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_recordertref = t10._recordertref) AND (_recorderrref = t10._recorderrref) AND (_lineno = t10._lineno) AND (_correspond = '1'::numeric))
  • Filter: ((_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda507'::bytea) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda507'::bytea) AND (t10._period = _period) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 1
24. 14,589.834 14,589.834 ↓ 3,108.0 3,108 798

Index Scan using _accrged1223_byperiod on _accrged1223 t12 (cost=0.28..3.33 rows=1 width=69) (actual time=0.020..18.283 rows=3,108 loops=798)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_fld1173 = '736876'::numeric) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_period >= '2018-12-06 09:34:59'::timestamp without time zone) AND (_period < '2019-01-01 00:00:00'::timestamp without time zone) AND (_kindrref = '\\xa24cc86000be40ca11e7ba1e12fda512'::bytea) AND (_correspond = '1'::numeric))
  • Filter: ((_value_type = '\\x08'::bytea) AND (_value_rtref = '\\x000000fe'::bytea) AND (_value_rrref = '\\x8a80c4346b563d4511e49bca46ac6b73'::bytea) AND (_value_type = '\\x08'::bytea) AND (_value_rtref = '\\x000000fe'::bytea) AND (_value_rrref = '\\x8a80c4346b563d4511e49bca46ac6b73'::bytea) AND ((_period > '2018-12-06 09:34:59'::timestamp without time zone) OR ((_period = '2018-12-06 09:34:59'::timestamp without time zone) AND ((_recordertref > '\\x00000203'::bytea) OR ((_recordertref = '\\x00000203'::bytea) AND (_recorderrref >= '\\x80ed704d7b898f0611e8f918ac01a671'::bytea))))))
  • Rows Removed by Filter: 2552
25. 6.204 6.204 ↑ 1.0 1 517

Index Scan using _acc37_s_hpk on _acc37 t13 (cost=0.17..3.19 rows=1 width=21) (actual time=0.012..0.012 rows=1 loops=517)

  • Index Cond: ((_fld1173 = '736876'::numeric) AND (_idrref = t3._accountrref))