explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9yLW

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=2.08..408,731.70 rows=45 width=392) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.08..242,022,432.97 rows=26,646 width=392) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.80..241,998,691.14 rows=26,646 width=382) (actual rows= loops=)

  • Join Filter: (t1._idrref = t3.fld12108_rrref)
4. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1.25..7,332,150.86 rows=26,646 width=222) (actual rows= loops=)

  • Join Filter: ((CASE WHEN (SubPlan 2) THEN true ELSE false END = CASE WHEN (SubPlan 3) THEN true ELSE false END) AND (CASE WHEN (SubPlan 4) THEN true ELSE false END = CASE WHEN (SubPlan 5) THEN true ELSE false END) AND (CASE WHEN (SubPlan 6) THEN true ELSE false END = CASE WHEN (SubPlan 7) THEN true ELSE false END))
5. 0.000 0.000 ↓ 0.0

Index Scan Backward using _document231_bydocdate_trl on _document231 t1 (cost=0.41..8,451.84 rows=26,646 width=282) (actual rows= loops=)

  • Index Cond: (_fld601 = '0'::numeric)
6. 0.000 0.000 ↓ 0.0

Materialize (cost=0.83..1,022.96 rows=16 width=20) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.83..1,022.88 rows=16 width=20) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.69..188.86 rows=33 width=20) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Only Scan using _reference83_byfieldfld1971_sr on _reference83 t15 (cost=0.28..8.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (_fld1971 = 'Документ.ЗаказПоставщику'::mvarchar)
10. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg11383_bydims_rr on _inforg11383 t17 (cost=0.41..179.56 rows=101 width=40) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld11384rref = t15._idrref))
11. 0.000 0.000 ↓ 0.0

Index Only Scan using _reference60hpk on _reference60 t16 (cost=0.14..25.25 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_idrref = t17._fld11385rref))
  • Filter: (SubPlan 1)
12.          

SubPlan (forIndex Only Scan)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.58..25.09 rows=1 width=0) (actual rows= loops=)

  • Join Filter: ((t18._fld11311_type = t19._fld1574_type) AND (t18._fld11311_rtref = t19._fld1574_rtref) AND (t18._fld11311_rrref = t19._fld1574_rrref))
14. 0.000 0.000 ↓ 0.0

Index Scan using _inforg11310_bydims11314_rr on _inforg11310 t18 (cost=0.28..15.40 rows=5 width=33) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld11312_type = '\x08'::bytea) AND (_fld11312_rtref = '\x0000007f'::bytea) AND (_fld11312_rrref = '\x2b8000259072bf6c11e3d6848243f7b6'::bytea))
  • Filter: _fld11313
15. 0.000 0.000 ↓ 0.0

Materialize (cost=4.30..9.39 rows=3 width=33) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on _reference60_vt1572 t19 (cost=4.30..9.38 rows=3 width=33) (actual rows= loops=)

  • Recheck Cond: ((_fld601 = '0'::numeric) AND (_reference60_idrref = t16._idrref))
17. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on _reference60_vt1572_intkeyind (cost=0.00..4.30 rows=3 width=0) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_reference60_idrref = t16._idrref))
18.          

SubPlan (forNested Loop Semi Join)

19. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10666_rrrl on _inforg10660 t20 (cost=0.28..8.31 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10664_type = '\x08'::bytea) AND (_fld10664_rtref = '\x00000075'::bytea) AND (_fld10664_rrref = t1._fld5814rref) AND (_fld10661rref = t16._idrref) AND (_fld10662rref = '\x91a4c8a3ef0ea8164d35d4f3c47cdf9a'::bytea) AND (_fld10663 = false))
  • Filter: (NOT _fld10663)
20. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10665_rrlr on _inforg10660 t21 (cost=0.28..8.30 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10662rref = '\x91a4c8a3ef0ea8164d35d4f3c47cdf9a'::bytea) AND (_fld10661rref = t16._idrref) AND (_fld10663 = true))
  • Filter: _fld10663
21. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10666_rrrl on _inforg10660 t22 (cost=0.28..8.31 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10664_type = '\x08'::bytea) AND (_fld10664_rtref = '\x000000a6'::bytea) AND (_fld10664_rrref = t1._fld5816rref) AND (_fld10661rref = t16._idrref) AND (_fld10662rref = '\x952ec3166361e238431777c1ef06b88b'::bytea) AND (_fld10663 = false))
  • Filter: (NOT _fld10663)
22. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10665_rrlr on _inforg10660 t23 (cost=0.28..8.30 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10662rref = '\x952ec3166361e238431777c1ef06b88b'::bytea) AND (_fld10661rref = t16._idrref) AND (_fld10663 = true))
  • Filter: _fld10663
23. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10666_rrrl on _inforg10660 t24 (cost=0.28..8.31 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10664_type = '\x08'::bytea) AND (_fld10664_rtref = '\x000000b2'::bytea) AND (_fld10664_rrref = t1._fld5841rref) AND (_fld10661rref = t16._idrref) AND (_fld10662rref = '\x88353eea6d0419194442c04adbed9b27'::bytea) AND (_fld10663 = false))
  • Filter: (NOT _fld10663)
24. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10665_rrlr on _inforg10660 t25 (cost=0.28..8.30 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10662rref = '\x88353eea6d0419194442c04adbed9b27'::bytea) AND (_fld10661rref = t16._idrref) AND (_fld10663 = true))
  • Filter: _fld10663
25. 0.000 0.000 ↓ 0.0

Materialize (cost=0.55..232,720,062.15 rows=4,870 width=180) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Subquery Scan on t3 (cost=0.55..232,720,037.80 rows=4,870 width=180) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.55..232,719,989.10 rows=4,870 width=321) (actual rows= loops=)

  • Group Key: t5._fld12108_type, t5._fld12108_rtref, t5._fld12108_rrref
  • Filter: ((sum((sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12112 ELSE '0'::numeric END))) <> '0'::numeric) OR (sum((sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12112 END))) <> '0'::numeric) OR (sum((((sum('0'::numeric)) + (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12112 ELSE '0'::numeric END))) - (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12112 END)))) <> '0'::numeric) OR (sum((sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12111 ELSE '0'::numeric END))) <> '0'::numeric) OR (sum((sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12111 END))) <> '0'::numeric) OR (sum((((sum('0'::numeric)) + (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12111 ELSE '0'::numeric END))) - (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12111 END)))) <> '0'::numeric) OR (sum((sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12110 ELSE '0'::numeric END))) <> '0'::numeric) OR (sum((sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12110 END))) <> '0'::numeric) OR (sum((((sum('0'::numeric)) + (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12110 ELSE '0'::numeric END))) - (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12110 END)))) <> '0'::numeric))
28. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.55..232,715,642.38 rows=48,703 width=321) (actual rows= loops=)

  • Group Key: t5._fld12108_type, t5._fld12108_rtref, t5._fld12108_rrref
  • Filter: ((sum('0'::numeric) <> '0'::numeric) OR (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12112 ELSE '0'::numeric END) <> '0'::numeric) OR (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12112 END) <> '0'::numeric) OR (sum('0'::numeric) <> '0'::numeric) OR (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12111 ELSE '0'::numeric END) <> '0'::numeric) OR (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12111 END) <> '0'::numeric) OR (sum('0'::numeric) <> '0'::numeric) OR (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN t5._fld12110 ELSE '0'::numeric END) <> '0'::numeric) OR (sum(CASE WHEN (t5._recordkind = '0'::numeric) THEN '0'::numeric ELSE t5._fld12110 END) <> '0'::numeric))
29. 0.000 0.000 ↓ 0.0

Index Scan using _accumrg12106_bydims12120_rtrn on _accumrg12106 t5 (cost=0.55..232,702,830.52 rows=109,544 width=50) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND ('\x08'::bytea = _fld12108_type) AND ('\x000000e7'::bytea = _fld12108_rtref))
  • Filter: (_active AND (SubPlan 11))
30.          

SubPlan (forIndex Scan)

31. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.25..1,061.90 rows=1 width=0) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1.25..1,061.87 rows=1 width=0) (actual rows= loops=)

  • Join Filter: (CASE WHEN (SubPlan 9) THEN true ELSE false END = CASE WHEN (SubPlan 10) THEN true ELSE false END)
33. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10383_byresource10390_rrrr on _inforg10383 t6 (cost=0.41..8.43 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10387rref = t5._fld12107rref))
34. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.83..1,022.88 rows=16 width=20) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.69..188.86 rows=33 width=20) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Index Only Scan using _reference83_byfieldfld1971_sr on _reference83 t7 (cost=0.28..8.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (_fld1971 = 'РегистрНакопления.РасчетыСПоставщиками'::mvarchar)
37. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg11383_bydims_rr on _inforg11383 t9 (cost=0.41..179.56 rows=101 width=40) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld11384rref = t7._idrref))
38. 0.000 0.000 ↓ 0.0

Index Only Scan using _reference60hpk on _reference60 t8 (cost=0.14..25.25 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_idrref = t9._fld11385rref))
  • Filter: (SubPlan 8)
39.          

SubPlan (forIndex Only Scan)

40. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.58..25.09 rows=1 width=0) (actual rows= loops=)

  • Join Filter: ((t10._fld11311_type = t11._fld1574_type) AND (t10._fld11311_rtref = t11._fld1574_rtref) AND (t10._fld11311_rrref = t11._fld1574_rrref))
41. 0.000 0.000 ↓ 0.0

Index Scan using _inforg11310_bydims11314_rr on _inforg11310 t10 (cost=0.28..15.40 rows=5 width=33) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld11312_type = '\x08'::bytea) AND (_fld11312_rtref = '\x0000007f'::bytea) AND (_fld11312_rrref = '\x2b8000259072bf6c11e3d6848243f7b6'::bytea))
  • Filter: _fld11313
42. 0.000 0.000 ↓ 0.0

Materialize (cost=4.30..9.39 rows=3 width=33) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on _reference60_vt1572 t11 (cost=4.30..9.38 rows=3 width=33) (actual rows= loops=)

  • Recheck Cond: ((_fld601 = '0'::numeric) AND (_reference60_idrref = t8._idrref))
44. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on _reference60_vt1572_intkeyind (cost=0.00..4.30 rows=3 width=0) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_reference60_idrref = t8._idrref))
45.          

SubPlan (forNested Loop Semi Join)

46. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10666_rrrl on _inforg10660 t12 (cost=0.28..8.31 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10664_type = '\x08'::bytea) AND (_fld10664_rtref = '\x00000075'::bytea) AND (_fld10664_rrref = t6._fld10385rref) AND (_fld10661rref = t8._idrref) AND (_fld10662rref = '\x91a4c8a3ef0ea8164d35d4f3c47cdf9a'::bytea) AND (_fld10663 = false))
  • Filter: (NOT _fld10663)
47. 0.000 0.000 ↓ 0.0

Index Only Scan using _inforg10660_bydims10665_rrlr on _inforg10660 t13 (cost=0.28..8.30 rows=1 width=1) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (_fld10662rref = '\x91a4c8a3ef0ea8164d35d4f3c47cdf9a'::bytea) AND (_fld10661rref = t8._idrref) AND (_fld10663 = true))
  • Filter: _fld10663
48. 0.000 0.000 ↓ 0.0

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

49. 0.000 0.000 ↓ 0.0

Index Scan using _reference68hpk on _reference68 t14 (cost=0.29..0.46 rows=1 width=40) (actual rows= loops=)

  • Index Cond: ((_fld601 = '0'::numeric) AND (t1._fld5845rref = _idrref))