explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l7DQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 165,016.125 ↑ 1.0 1 1

Nested Loop (cost=12,855,160,113,236,476..12,856,270,113,246,270 rows=1 width=49) (actual time=165,016.119..165,016.125 rows=1 loops=1)

  • Buffers: shared hit=32684492 dirtied=5
2. 0.012 165,014.938 ↑ 1.0 1 1

GroupAggregate (cost=12,855,150,113,236,476..12,855,150,113,236,476 rows=1 width=42) (actual time=165,014.938..165,014.938 rows=1 loops=1)

  • Group Key: t3._fld13232rref, t4._fld17416rref
  • Buffers: shared hit=32684320 dirtied=5
3. 0.050 165,014.926 ↑ 1.0 1 1

Sort (cost=12,855,150,113,236,476..12,855,150,113,236,476 rows=1 width=42) (actual time=165,014.925..165,014.926 rows=1 loops=1)

  • Sort Key: t3._fld13232rref, t4._fld17416rref
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=32684320 dirtied=5
4. 4.289 165,014.876 ↑ 1.0 1 1

Hash Join (cost=695.09..12,855,150,113,236,476 rows=1 width=42) (actual time=154,980.301..165,014.876 rows=1 loops=1)

  • Buffers: shared hit=32684320 dirtied=5
5. 221.334 165,007.596 ↓ 33.2 3,021 1

Hash Join (cost=436.03..12,855,150,113,236,216 rows=91 width=59) (actual time=96.719..165,007.596 rows=3,021 loops=1)

  • Buffers: shared hit=32684138 dirtied=5
6. 2,056.936 164,781.208 ↓ 2.0 199,025 1

Seq Scan on _accumrg13231 t3 (cost=0..12,855,150,113,235,518 rows=100,117 width=42) (actual time=2.196..164,781.208 rows=199,025 loops=1)

  • Filter: ((t3._period < '2020-03-17 12:37:30'::timestamp without time zone) AND (t3._fld13247 > '0'::numeric) AND (t3._fld974 = '0'::numeric) AND (SubPlan 2))
  • Buffers: shared hit=32683826 dirtied=5
7.          

SubPlan (for Seq Scan)

8. 514.585 162,724.272 ↑ 1.0 1 199,417

Nested Loop (cost=30,000,000,005.53..30,000,000,264.15 rows=1 width=0) (actual time=0.816..0.816 rows=1 loops=199,417)

  • Buffers: shared hit=32645184
9. 598.251 2,193.587 ↑ 1.0 1 199,417

Nested Loop (cost=10,000,000,000.41..10,000,000,002.46 rows=1 width=0) (actual time=0.011..0.011 rows=1 loops=199,417)

  • Filter: ((CASE WHEN (t6._fld10482rref IS NULL) THEN '\\001'::bytea ELSE CASE WHEN (t6._fld10482rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END END <> '\\001'::bytea) AND (CASE WHEN (t6._fld10481rref IS NULL) THEN '\\001'::bytea ELSE CASE WHEN (t6._fld10481rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END END <> '\\001'::bytea))
  • Buffers: shared hit=801178
10. 0.000 0.000 ↑ 1.0 1 199,417

Result (cost=0..0.01 rows=1 width=4) (actual time=0..0 rows=1 loops=199,417)

11. 1,595.336 1,595.336 ↑ 1.0 1 199,417

Index Only Scan using _inforg10480_6 on _inforg10480 t6 (cost=0.41..2.43 rows=1 width=34) (actual time=0.008..0.008 rows=1 loops=199,417)

  • Index Cond: ((t6._fld974 = '0'::numeric) AND (t6._fld10486rref = t3._fld13234rref))
  • Heap Fetches: 199025
  • Buffers: shared hit=801178
12. 398.050 160,016.100 ↑ 1.0 1 199,025

Merge Join (cost=10,000,000,005.12..10,000,000,261.68 rows=1 width=0) (actual time=0.804..0.804 rows=1 loops=199,025)

  • Buffers: shared hit=31844006
13. 36,620.600 159,618.050 ↓ 2.0 2 199,025

Merge Join (cost=10,000,000,000.82..10,000,000,257.36 rows=1 width=49) (actual time=0.469..0.802 rows=2 loops=199,025)

  • Buffers: shared hit=31844003
14. 597.075 6,965.875 ↓ 3.0 3 199,025

Nested Loop (cost=10,000,000,000.54..10,000,000,004.59 rows=1 width=49) (actual time=0.014..0.035 rows=3 loops=199,025)

  • Buffers: shared hit=2786353
15. 995.125 995.125 ↓ 3.0 3 199,025

Index Only Scan using _reference90_s_hpk on _reference90 t8 (cost=0.14..2.16 rows=1 width=32) (actual time=0.004..0.005 rows=3 loops=199,025)

  • Index Cond: (t8._fld974 = '0'::numeric)
  • Heap Fetches: 597075
  • Buffers: shared hit=398050
16. 5,373.675 5,373.675 ↑ 1.0 1 597,075

Index Only Scan using _reference124_7 on _reference124 t7 (cost=0.41..2.42 rows=1 width=17) (actual time=0.009..0.009 rows=1 loops=597,075)

  • Index Cond: (t7._fld17247 = 'РегистрНакопления.ВыручкаИСебестоимостьПродаж'::mvarchar)
  • Heap Fetches: 597075
  • Buffers: shared hit=2388303
17. 116,031.575 116,031.575 ↑ 4.0 1,341 199,025

Index Only Scan using _inforg12877_2 on _inforg12877 t9 (cost=0.28..236.51 rows=5,299 width=34) (actual time=0.024..0.583 rows=1,341 loops=199,025)

  • Index Cond: ((t9._fld974 = '0'::numeric) AND (t9._fld12878_type = '\\010'::bytea) AND (t9._fld12878_rtref = '\\000\\000\\000|'::bytea))
  • Heap Fetches: 266892525
  • Buffers: shared hit=29057650
18. 0.000 0.000 ↑ 1.0 1 199,025

Sort (cost=4.3..4.3 rows=1 width=17) (actual time=0..0 rows=1 loops=199,025)

  • Sort Key: t10._reference90_idrref
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
19. 0.028 0.105 ↓ 2.0 2 1

Hash Join (cost=2.23..4.29 rows=1 width=17) (actual time=0.092..0.105 rows=2 loops=1)

  • Buffers: shared hit=3
20. 0.025 0.025 ↑ 1.0 52 1

Seq Scan on _reference90_vt16509 t10 (cost=0..1.65 rows=52 width=41) (actual time=0.016..0.025 rows=52 loops=1)

  • Filter: (t10._fld974 = '0'::numeric)
  • Buffers: shared hit=1
21. 0.010 0.052 ↑ 1.0 2 1

Hash (cost=2.19..2.19 rows=2 width=24) (actual time=0.052..0.052 rows=2 loops=1)

  • Buffers: shared hit=2
22. 0.042 0.042 ↑ 1.0 2 1

Index Only Scan using _inforg12554_2 on _inforg12554 t11 (cost=0.14..2.19 rows=2 width=24) (actual time=0.041..0.042 rows=2 loops=1)

  • Index Cond: ((t11._fld974 = '0'::numeric) AND (t11._fld12556_type = '\\010'::bytea) AND (t11._fld12556_rtref = '\\000\\000\\000\\313'::bytea) AND (t11._fld12556_rrref = '\\256\\310\\000\\031[\\213\\001\\320\\021\\341RJO\\204z\\313'::bytea))
  • Heap Fetches: 2
  • Buffers: shared hit=2
23. 0.022 5.054 ↓ 1.3 8 1

Hash (cost=435.96..435.96 rows=6 width=34) (actual time=5.054..5.054 rows=8 loops=1)

  • Buffers: shared hit=312
24. 5.032 5.032 ↓ 1.3 8 1

Seq Scan on _reference142 t4 (cost=0..435.96 rows=6 width=34) (actual time=1.301..5.032 rows=8 loops=1)

  • Filter: ((t4._fld974 = '0'::numeric) AND (t4._fld17416rref = ANY ('{"\\\\200\\\\315p\\\\213\\\\315\\\\252\\\\253\\\\237\\\\021\\\\351\\\\202\\\\022e\\\\2521\\\\333","\\\\241\\\\337\\\\000\\\\031[\\\\213\\\\001\\\\320\\\\021\\\\340\\\\036\\\\346niwx","\\\\241\\\\337\\\\000\\\\031[\\\\213\\\\001\\\\320\\\\021\\\\340\\\\036F\\\\203\\\\374\\\\302\\\\324","\\\\256\\\\312\\\\000\\\\031[\\\\213\\\\001\\\\320\\\\021\\\\341n[\\\\224\\\\322\\\\363\\\\240","\\\\241\\\\337\\\\000\\\\031[\\\\213\\\\001\\\\320\\\\021\\\\340\\\\036U\\\\365\\\\350}\\\\377"}'::bytea[])))
  • Buffers: shared hit=312
25. 0.012 2.991 ↑ 1.5 2 1

Hash (cost=259.02..259.02 rows=3 width=17) (actual time=2.991..2.991 rows=2 loops=1)

  • Buffers: shared hit=182
26. 2.979 2.979 ↑ 1.5 2 1

Seq Scan on _reference144 t5 (cost=0..259.02 rows=3 width=17) (actual time=2.851..2.979 rows=2 loops=1)

  • Filter: ((t5._fld974 = '0'::numeric) AND (t5._fld17430rref = '\\200\\315p\\213\\315\\252\\253\\237\\021\\352L\\232\\375\\264\\233\\374'::bytea))
  • Buffers: shared hit=182
27. 0.121 1.163 ↑ 1.0 1 1

Index Scan using _accumrg13231_1 on _accumrg13231 t1 (cost=0.42..1,110,000,009,794.32 rows=1 width=33) (actual time=1.157..1.163 rows=1 loops=1)

  • Index Cond: ((t1._fld974 = '0'::numeric) AND (t1._period = (max(t3._period))))
  • Filter: ((t1._fld13247 > '0'::numeric) AND (t3._fld13232rref = t1._fld13232rref) AND (SubPlan 1))
  • Buffers: shared hit=172
28.          

SubPlan (for Index Scan)

29. 0.021 1.042 ↑ 1.0 1 1

Nested Loop (cost=30,000,000,005.53..30,000,000,264.15 rows=1 width=0) (actual time=1.042..1.042 rows=1 loops=1)

  • Buffers: shared hit=167
30. 0.028 0.070 ↑ 1.0 1 1

Nested Loop (cost=10,000,000,000.41..10,000,000,002.46 rows=1 width=0) (actual time=0.07..0.07 rows=1 loops=1)

  • Filter: ((CASE WHEN (t12._fld10482rref IS NULL) THEN '\\001'::bytea ELSE CASE WHEN (t12._fld10482rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END END <> '\\001'::bytea) AND (CASE WHEN (t12._fld10481rref IS NULL) THEN '\\001'::bytea ELSE CASE WHEN (t12._fld10481rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END END <> '\\001'::bytea))
  • Buffers: shared hit=4
31. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0..0.01 rows=1 width=4) (actual time=0..0 rows=1 loops=1)

32. 0.042 0.042 ↑ 1.0 1 1

Index Only Scan using _inforg10480_6 on _inforg10480 t12 (cost=0.41..2.43 rows=1 width=34) (actual time=0.041..0.042 rows=1 loops=1)

  • Index Cond: ((t12._fld974 = '0'::numeric) AND (t12._fld10486rref = t1._fld13234rref))
  • Heap Fetches: 1
  • Buffers: shared hit=4
33. 0.003 0.951 ↑ 1.0 1 1

Merge Join (cost=10,000,000,005.12..10,000,000,261.68 rows=1 width=0) (actual time=0.951..0.951 rows=1 loops=1)

  • Buffers: shared hit=163
34. 0.158 0.739 ↓ 2.0 2 1

Merge Join (cost=10,000,000,000.82..10,000,000,257.36 rows=1 width=49) (actual time=0.447..0.739 rows=2 loops=1)

  • Buffers: shared hit=160
35. 0.004 0.058 ↓ 3.0 3 1

Nested Loop (cost=10,000,000,000.54..10,000,000,004.59 rows=1 width=49) (actual time=0.038..0.058 rows=3 loops=1)

  • Buffers: shared hit=14
36. 0.018 0.018 ↓ 3.0 3 1

Index Only Scan using _reference90_s_hpk on _reference90 t14 (cost=0.14..2.16 rows=1 width=32) (actual time=0.017..0.018 rows=3 loops=1)

  • Index Cond: (t14._fld974 = '0'::numeric)
  • Heap Fetches: 3
  • Buffers: shared hit=2
37. 0.036 0.036 ↑ 1.0 1 3

Index Only Scan using _reference124_7 on _reference124 t13 (cost=0.41..2.42 rows=1 width=17) (actual time=0.012..0.012 rows=1 loops=3)

  • Index Cond: (t13._fld17247 = 'РегистрНакопления.ВыручкаИСебестоимостьПродаж'::mvarchar)
  • Heap Fetches: 3
  • Buffers: shared hit=12
38. 0.523 0.523 ↑ 4.0 1,341 1

Index Only Scan using _inforg12877_2 on _inforg12877 t15 (cost=0.28..236.51 rows=5,299 width=34) (actual time=0.033..0.523 rows=1,341 loops=1)

  • Index Cond: ((t15._fld974 = '0'::numeric) AND (t15._fld12878_type = '\\010'::bytea) AND (t15._fld12878_rtref = '\\000\\000\\000|'::bytea))
  • Heap Fetches: 1341
  • Buffers: shared hit=146
39. 0.067 0.209 ↑ 1.0 1 1

Sort (cost=4.3..4.3 rows=1 width=17) (actual time=0.209..0.209 rows=1 loops=1)

  • Sort Key: t16._reference90_idrref
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
40. 0.074 0.142 ↓ 2.0 2 1

Hash Join (cost=2.23..4.29 rows=1 width=17) (actual time=0.128..0.142 rows=2 loops=1)

  • Buffers: shared hit=3
41. 0.037 0.037 ↑ 1.0 52 1

Seq Scan on _reference90_vt16509 t16 (cost=0..1.65 rows=52 width=41) (actual time=0.028..0.037 rows=52 loops=1)

  • Filter: (t16._fld974 = '0'::numeric)
  • Buffers: shared hit=1
42. 0.006 0.031 ↑ 1.0 2 1

Hash (cost=2.19..2.19 rows=2 width=24) (actual time=0.031..0.031 rows=2 loops=1)

  • Buffers: shared hit=2
43. 0.025 0.025 ↑ 1.0 2 1

Index Only Scan using _inforg12554_2 on _inforg12554 t17 (cost=0.14..2.19 rows=2 width=24) (actual time=0.024..0.025 rows=2 loops=1)

  • Index Cond: ((t17._fld974 = '0'::numeric) AND (t17._fld12556_type = '\\010'::bytea) AND (t17._fld12556_rtref = '\\000\\000\\000\\313'::bytea) AND (t17._fld12556_rrref = '\\256\\310\\000\\031[\\213\\001\\320\\021\\341RJO\\204z\\313'::bytea))
  • Heap Fetches: 2
  • Buffers: shared hit=2
Planning time : 10.523 ms
Execution time : 165,016.779 ms