explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l38n : Optimization for: plan #DCuI

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.014 215,005.750 ↓ 6.2 50 1

Limit (cost=9,796.89..42,550.96 rows=8 width=2,544) (actual time=214,655.397..215,005.750 rows=50 loops=1)

2.          

CTE permitted_organizations

3. 0.319 312.116 ↓ 5.5 547 1

Hash Join (cost=3.01..86.45 rows=100 width=12) (actual time=310.996..312.116 rows=547 loops=1)

  • Hash Cond: (t_14.id = (unnest(d.d)))
4. 0.810 0.810 ↑ 1.0 1,341 1

Seq Scan on m_orgreestr t_14 (cost=0.00..77.41 rows=1,341 width=12) (actual time=0.002..0.810 rows=1,341 loops=1)

5. 0.092 310.987 ↓ 5.5 547 1

Hash (cost=1.76..1.76 rows=100 width=4) (actual time=310.987..310.987 rows=547 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
6. 310.895 310.895 ↓ 5.5 547 1

Function Scan on get_orgreestr_ids_by_permision_and_filter d (cost=0.26..0.76 rows=100 width=4) (actual time=310.818..310.895 rows=547 loops=1)

7. 0.610 215,005.736 ↓ 6.2 50 1

Nested Loop (cost=9,710.44..42,464.51 rows=8 width=2,544) (actual time=214,655.395..215,005.736 rows=50 loops=1)

  • Join Filter: (p.f_long_medic_need = t_9.id)
  • Rows Removed by Join Filter: 147
8. 0.085 214,602.676 ↓ 6.2 50 1

Nested Loop (cost=9,710.44..41,074.06 rows=8 width=1,305) (actual time=214,602.365..214,602.676 rows=50 loops=1)

  • Join Filter: (p.f_invgroup = t_8.id)
  • Rows Removed by Join Filter: 196
9. 0.039 214,602.541 ↓ 6.2 50 1

Nested Loop (cost=9,710.44..41,072.39 rows=8 width=1,289) (actual time=214,602.334..214,602.541 rows=50 loops=1)

  • Join Filter: (p.f_healthgroup = t_7.id)
  • Rows Removed by Join Filter: 3
10. 0.007 0.007 ↑ 9.0 1 1

Seq Scan on m_medicgroup t_7 (cost=0.00..1.09 rows=9 width=75) (actual time=0.007..0.007 rows=1 loops=1)

11. 0.106 214,602.495 ↓ 6.6 53 1

Materialize (cost=9,710.44..41,070.24 rows=8 width=1,222) (actual time=214,602.320..214,602.495 rows=53 loops=1)

12. 1.765 214,602.389 ↓ 6.6 53 1

Nested Loop (cost=9,710.44..41,070.20 rows=8 width=1,222) (actual time=214,602.315..214,602.389 rows=53 loops=1)

  • Join Filter: (p.f_adapt_program_need = t_6.id)
  • Rows Removed by Join Filter: 3372
13. 0.002 0.002 ↑ 7.0 2 1

Seq Scan on m_eduprogramadapt t_6 (cost=0.00..1.14 rows=14 width=98) (actual time=0.002..0.002 rows=2 loops=1)

14. 6.615 214,600.622 ↓ 214.0 1,712 2

Materialize (cost=9,710.44..41,067.40 rows=8 width=1,132) (actual time=3,959.823..107,300.311 rows=1,712 loops=2)

15. 3.753 214,594.007 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,067.36 rows=8 width=1,132) (actual time=7,919.643..214,594.007 rows=3,372 loops=1)

  • Join Filter: (p.f_fizgroup = t_5.id)
  • Rows Removed by Join Filter: 10116
16. 20.838 214,586.882 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,065.83 rows=8 width=1,117) (actual time=7,919.634..214,586.882 rows=3,372 loops=1)

  • Join Filter: (p.f_difficultsituation = t_4.id)
  • Rows Removed by Join Filter: 97788
17. 0.014 0.014 ↑ 1.0 30 1

Seq Scan on m_difficultsituationlist t_4 (cost=0.00..1.30 rows=30 width=100) (actual time=0.003..0.014 rows=30 loops=1)

18. 13.151 214,566.030 ↓ 421.5 3,372 30

Materialize (cost=9,710.44..41,060.95 rows=8 width=1,025) (actual time=263.988..7,152.201 rows=3,372 loops=30)

19. 4.484 214,552.879 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,060.91 rows=8 width=1,025) (actual time=7,919.625..214,552.879 rows=3,372 loops=1)

  • Join Filter: (p.f_citizenship = t_3.id)
  • Rows Removed by Join Filter: 13488
20. 7.091 214,545.023 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,059.25 rows=8 width=970) (actual time=7,919.616..214,545.023 rows=3,372 loops=1)

  • Join Filter: (p.f_gender = t_2.id)
  • Rows Removed by Join Filter: 6744
21. 7.533 214,534.560 ↓ 421.5 3,372 1

Nested Loop Semi Join (cost=9,710.44..41,057.85 rows=8 width=963) (actual time=7,919.598..214,534.560 rows=3,372 loops=1)

22. 50.862 214,274.127 ↓ 210.8 3,372 1

Nested Loop (cost=9,710.02..41,039.98 rows=16 width=971) (actual time=7,893.582..214,274.127 rows=3,372 loops=1)

23. 84.584 8,487.055 ↓ 69.1 74,273 1

Nested Loop (cost=9,709.59..39,769.06 rows=1,075 width=533) (actual time=7,538.596..8,487.055 rows=74,273 loops=1)

24. 38.442 8,179.652 ↓ 30.5 74,273 1

Unique (cost=9,709.17..24,748.04 rows=2,437 width=16) (actual time=7,538.589..8,179.652 rows=74,273 loops=1)

25. 72.569 8,141.210 ↓ 30.5 74,273 1

Nested Loop (cost=9,709.17..24,741.95 rows=2,437 width=16) (actual time=7,538.588..8,141.210 rows=74,273 loops=1)

26. 35.322 7,623.003 ↓ 30.5 74,273 1

Unique (cost=9,708.75..9,720.93 rows=2,437 width=16) (actual time=7,538.568..7,623.003 rows=74,273 loops=1)

27. 97.763 7,587.681 ↓ 30.5 74,385 1

Sort (cost=9,708.75..9,714.84 rows=2,437 width=16) (actual time=7,538.567..7,587.681 rows=74,385 loops=1)

  • Sort Key: cr.id, t_11.priority DESC
  • Sort Method: quicksort Memory: 6559kB
28. 46.376 7,489.918 ↓ 30.5 74,385 1

Hash Join (cost=5.49..9,571.66 rows=2,437 width=16) (actual time=325.007..7,489.918 rows=74,385 loops=1)

  • Hash Cond: (p_1.f_data_source = t_11.id)
29. 58.424 7,443.533 ↓ 30.5 74,385 1

Nested Loop (cost=4.38..9,537.03 rows=2,437 width=12) (actual time=324.986..7,443.533 rows=74,385 loops=1)

30. 17.041 1,285.539 ↓ 13.5 74,385 1

Nested Loop (cost=3.95..3,301.01 rows=5,526 width=12) (actual time=324.437..1,285.539 rows=74,385 loops=1)

31. 0.297 328.205 ↓ 5.5 547 1

Nested Loop (cost=3.53..254.35 rows=100 width=8) (actual time=312.484..328.205 rows=547 loops=1)

32. 0.716 313.686 ↓ 5.5 547 1

Hash Join (cost=3.25..86.69 rows=100 width=16) (actual time=312.469..313.686 rows=547 loops=1)

  • Hash Cond: (t_12.id = perm_org.organization_reestr_id)
33. 0.512 0.512 ↑ 1.0 1,341 1

Seq Scan on m_orgreestr t_12 (cost=0.00..77.41 rows=1,341 width=12) (actual time=0.003..0.512 rows=1,341 loops=1)

34. 0.114 312.458 ↓ 5.5 547 1

Hash (cost=2.00..2.00 rows=100 width=4) (actual time=312.458..312.458 rows=547 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
35. 312.344 312.344 ↓ 5.5 547 1

CTE Scan on permitted_organizations perm_org (cost=0.00..2.00 rows=100 width=4) (actual time=310.998..312.344 rows=547 loops=1)

36. 14.222 14.222 ↑ 1.0 1 547

Index Only Scan using m_organization_id_idx on m_organization t_13 (cost=0.28..1.67 rows=1 width=8) (actual time=0.025..0.026 rows=1 loops=547)

  • Index Cond: (id = t_12.f_max_priority)
  • Heap Fetches: 547
37. 940.293 940.293 ↑ 1.0 136 547

Index Scan using m_person_education_orgreestr_id_idx on m_person_education p_1 (cost=0.42..29.07 rows=140 width=16) (actual time=0.401..1.719 rows=136 loops=547)

  • Index Cond: (orgreestr_id = t_12.id)
  • Filter: (39 = ANY (learning_years))
  • Rows Removed by Filter: 384
38. 6,099.570 6,099.570 ↑ 1.0 1 74,385

Index Scan using m_childreestr_id_idx on m_childreestr cr (cost=0.42..1.12 rows=1 width=4) (actual time=0.081..0.082 rows=1 loops=74,385)

  • Index Cond: (id = p_1.childreestr_id)
  • Filter: (f_uptodate AND (NOT deleted))
39. 0.003 0.009 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=8) (actual time=0.009..0.009 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
40. 0.006 0.006 ↑ 1.0 5 1

Seq Scan on m_dataresource t_11 (cost=0.00..1.05 rows=5 width=8) (actual time=0.004..0.006 rows=5 loops=1)

41. 445.638 445.638 ↑ 1.0 1 74,273

Index Only Scan using m_childreestr_id_idx on m_childreestr t_10 (cost=0.42..6.14 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=74,273)

  • Index Cond: (id = cr.id)
  • Heap Fetches: 74273
42. 222.819 222.819 ↑ 1.0 1 74,273

Index Scan using m_childreestr_id_idx on m_childreestr t (cost=0.42..6.14 rows=1 width=533) (actual time=0.003..0.003 rows=1 loops=74,273)

  • Index Cond: (id = cr.id)
  • Filter: (f_uptodate AND (NOT deleted))
43. 205,736.210 205,736.210 ↓ 0.0 0 74,273

Index Scan using m_person_id_idx on m_person p (cost=0.42..1.17 rows=1 width=446) (actual time=2.770..2.770 rows=0 loops=74,273)

  • Index Cond: (id = t.f_max_priority)
  • Filter: (f_uptodate AND (NOT deleted) AND ((f_personlastname)::text ~~ 'А%'::text))
  • Rows Removed by Filter: 1
44. 175.344 252.900 ↑ 1.0 1 3,372

Nested Loop (cost=0.42..1.11 rows=1 width=5) (actual time=0.075..0.075 rows=1 loops=3,372)

45. 40.464 40.464 ↑ 1.0 1 3,372

Index Scan using i_urprivs_cat on urprivs t_1 (cost=0.28..0.30 rows=1 width=11) (actual time=0.012..0.012 rows=1 loops=3,372)

  • Index Cond: ((catalog = (p.cid)::numeric) AND (catalog IS NOT NULL))
  • Filter: ((unitcode)::text = 'orgreestr'::text)
46. 37.092 37.092 ↑ 1.0 1 3,372

Index Only Scan using uk_userroles on userroles t1 (cost=0.14..0.79 rows=1 width=5) (actual time=0.011..0.011 rows=1 loops=3,372)

  • Index Cond: ((roleid = t_1.roleid) AND (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric))
  • Heap Fetches: 3372
47. 3.364 3.372 ↑ 1.0 3 3,372

Materialize (cost=0.00..1.04 rows=3 width=15) (actual time=0.001..0.001 rows=3 loops=3,372)

48. 0.008 0.008 ↑ 1.0 3 1

Seq Scan on m_gender t_2 (cost=0.00..1.03 rows=3 width=15) (actual time=0.008..0.008 rows=3 loops=1)

49. 3.365 3.372 ↑ 1.0 5 3,372

Materialize (cost=0.00..1.07 rows=5 width=63) (actual time=0.000..0.001 rows=5 loops=3,372)

50. 0.007 0.007 ↑ 1.0 5 1

Seq Scan on m_citizenship t_3 (cost=0.00..1.05 rows=5 width=63) (actual time=0.005..0.007 rows=5 loops=1)

51. 3.366 3.372 ↑ 1.0 4 3,372

Materialize (cost=0.00..1.06 rows=4 width=23) (actual time=0.000..0.001 rows=4 loops=3,372)

52. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on m_fizgroup t_5 (cost=0.00..1.04 rows=4 width=23) (actual time=0.005..0.006 rows=4 loops=1)

53. 0.025 0.050 ↑ 1.0 5 50

Materialize (cost=0.00..1.07 rows=5 width=24) (actual time=0.001..0.001 rows=5 loops=50)

54. 0.025 0.025 ↑ 1.0 5 1

Seq Scan on m_invgroup t_8 (cost=0.00..1.05 rows=5 width=24) (actual time=0.025..0.025 rows=5 loops=1)

55. 0.032 0.050 ↑ 1.0 4 50

Materialize (cost=0.00..1.06 rows=4 width=64) (actual time=0.000..0.001 rows=4 loops=50)

56. 0.018 0.018 ↑ 1.0 4 1

Seq Scan on m_sickchildrenedutypes t_9 (cost=0.00..1.04 rows=4 width=64) (actual time=0.014..0.018 rows=4 loops=1)

57.          

SubPlan (for Nested Loop)

58. 0.050 401.000 ↑ 1.0 1 50

Limit (cost=0.98..17.06 rows=1 width=97) (actual time=8.020..8.020 rows=1 loops=50)

59. 0.104 400.950 ↑ 1.0 1 50

Nested Loop (cost=0.98..17.06 rows=1 width=97) (actual time=8.019..8.019 rows=1 loops=50)

60. 0.177 400.550 ↑ 1.0 1 50

Nested Loop (cost=0.84..16.89 rows=1 width=8) (actual time=8.011..8.011 rows=1 loops=50)

61. 193.950 193.950 ↑ 1.0 1 50

Index Scan using m_documentchild2child_f_child_idx on m_documentchild2child t_15 (cost=0.42..8.44 rows=1 width=8) (actual time=3.879..3.879 rows=1 loops=50)

  • Index Cond: (f_child = t.f_max_priority)
62. 206.423 206.423 ↑ 1.0 1 37

Index Scan using m_documentchild_id_idx on m_documentchild t_16 (cost=0.42..8.44 rows=1 width=16) (actual time=5.579..5.579 rows=1 loops=37)

  • Index Cond: (id = t_15.f_document)
  • Filter: (f_uptodate AND (NOT deleted))
63. 0.296 0.296 ↑ 1.0 1 37

Index Scan using m_doctypes_id_idx on m_doctypes t_17 (cost=0.14..0.16 rows=1 width=101) (actual time=0.008..0.008 rows=1 loops=37)

  • Index Cond: (id = t_16.f_doc_type)
64. 0.050 0.700 ↑ 1.0 1 50

Limit (cost=0.98..17.06 rows=1 width=4) (actual time=0.013..0.014 rows=1 loops=50)

65. 0.039 0.650 ↑ 1.0 1 50

Nested Loop (cost=0.98..17.06 rows=1 width=4) (actual time=0.013..0.013 rows=1 loops=50)

66. 0.102 0.500 ↑ 1.0 1 50

Nested Loop (cost=0.84..16.89 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=50)

67. 0.250 0.250 ↑ 1.0 1 50

Index Scan using m_documentchild2child_f_child_idx on m_documentchild2child t_18 (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=50)

  • Index Cond: (f_child = t.f_max_priority)
68. 0.148 0.148 ↑ 1.0 1 37

Index Scan using m_documentchild_id_idx on m_documentchild t_19 (cost=0.42..8.44 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=37)

  • Index Cond: (id = t_18.f_document)
  • Filter: (f_uptodate AND (NOT deleted))
69. 0.111 0.111 ↑ 1.0 1 37

Index Only Scan using m_doctypes_id_idx on m_doctypes t_20 (cost=0.14..0.16 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=37)

  • Index Cond: (id = t_19.f_doc_type)
  • Heap Fetches: 37
70. 0.050 0.350 ↑ 1.0 1 50

Limit (cost=0.84..16.89 rows=1 width=6) (actual time=0.007..0.007 rows=1 loops=50)

71. 0.039 0.300 ↑ 1.0 1 50

Nested Loop (cost=0.84..16.89 rows=1 width=6) (actual time=0.006..0.006 rows=1 loops=50)

72. 0.150 0.150 ↑ 1.0 1 50

Index Scan using m_documentchild2child_f_child_idx on m_documentchild2child t_21 (cost=0.42..8.44 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=50)

  • Index Cond: (f_child = t.f_max_priority)
73. 0.111 0.111 ↑ 1.0 1 37

Index Scan using m_documentchild_id_idx on m_documentchild t_22 (cost=0.42..8.44 rows=1 width=14) (actual time=0.003..0.003 rows=1 loops=37)

  • Index Cond: (id = t_21.f_document)
  • Filter: (f_uptodate AND (NOT deleted))
74. 0.050 0.350 ↑ 1.0 1 50

Limit (cost=0.84..16.89 rows=1 width=7) (actual time=0.007..0.007 rows=1 loops=50)

75. 0.039 0.300 ↑ 1.0 1 50

Nested Loop (cost=0.84..16.89 rows=1 width=7) (actual time=0.006..0.006 rows=1 loops=50)

76. 0.150 0.150 ↑ 1.0 1 50

Index Scan using m_documentchild2child_f_child_idx on m_documentchild2child t_23 (cost=0.42..8.44 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=50)

  • Index Cond: (f_child = t.f_max_priority)
77. 0.111 0.111 ↑ 1.0 1 37

Index Scan using m_documentchild_id_idx on m_documentchild t_24 (cost=0.42..8.44 rows=1 width=15) (actual time=0.003..0.003 rows=1 loops=37)

  • Index Cond: (id = t_23.f_document)
  • Filter: f_uptodate
78. 0.000 0.000 ↓ 0.0 0

Subquery Scan on data (cost=15.43..52.84 rows=1 width=32) (never executed)

79.          

Initplan (for Subquery Scan)

80. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_25 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '3'::text)
81. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_26 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '1'::text)
82. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_27 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '2'::text)
83. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_28 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '3'::text)
84. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_29 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '0'::text)
85. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_30 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '1'::text)
86. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_31 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '2'::text)
87. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_32 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '3'::text)
88. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_33 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '4'::text)
89. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=5.75..43.13 rows=1 width=40) (never executed)

  • Group Key: p_2.f_link2reestr
90. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.75..43.11 rows=1 width=10) (never executed)

91. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.62..42.94 rows=1 width=16) (never executed)

92. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.20..42.46 rows=1 width=16) (never executed)

93. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=4.78..18.38 rows=1 width=16) (never executed)

  • Join Filter: ((p_2.cid)::numeric = t_36.catalog)
94. 0.000 0.000 ↓ 0.0 0

Index Scan using m_person_f_link2reestr_idx on m_person p_2 (cost=0.42..8.44 rows=1 width=24) (never executed)

  • Index Cond: (f_link2reestr = t.id)
  • Filter: (f_uptodate AND (NOT deleted))
95. 0.000 0.000 ↓ 0.0 0

Materialize (cost=4.35..9.83 rows=6 width=5) (never executed)

96. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=4.35..9.80 rows=6 width=5) (never executed)

97. 0.000 0.000 ↓ 0.0 0

Seq Scan on userroles t1_1 (cost=0.00..1.30 rows=1 width=5) (never executed)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
98. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on urprivs t_36 (cost=4.35..8.44 rows=6 width=11) (never executed)

  • Recheck Cond: (((unitcode)::text = 'orgreestr'::text) AND (roleid = t1_1.roleid) AND (catalog IS NOT NULL))
99. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on i_urprivs_uc (cost=0.00..4.35 rows=6 width=0) (never executed)

  • Index Cond: (((unitcode)::text = 'orgreestr'::text) AND (roleid = t1_1.roleid) AND (catalog IS NOT NULL))
100. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declaration2child_f_child_idx on m_declaration2child t_35 (cost=0.42..24.03 rows=5 width=16) (never executed)

  • Index Cond: (f_child = p_2.id)
101. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declaration_id_idx on m_declaration t_34 (cost=0.42..0.47 rows=1 width=12) (never executed)

  • Index Cond: (id = t_35.f_decl)
  • Filter: (f_uptodate AND (NOT deleted))
102. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declarationtype_id_idx on m_declarationtype t_37 (cost=0.13..0.16 rows=1 width=6) (never executed)

  • Index Cond: (id = t_34.f_delc_type)
  • Filter: ((code)::text = ANY ('{0,1,2,3,4}'::text[]))
103. 0.000 0.000 ↓ 0.0 0

Subquery Scan on data_1 (cost=15.47..52.88 rows=1 width=32) (never executed)

104.          

Initplan (for Subquery Scan)

105. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_38 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '3'::text)
106. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_39 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '1'::text)
107. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_40 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '2'::text)
108. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_41 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '3'::text)
109. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_42 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '0'::text)
110. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_43 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '1'::text)
111. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_44 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '2'::text)
112. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_45 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '3'::text)
113. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_declarationtype t_46 (cost=0.00..1.08 rows=1 width=32) (never executed)

  • Filter: ((code)::text = '4'::text)
114. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=5.75..43.13 rows=1 width=40) (never executed)

  • Group Key: p_3.f_link2reestr
115. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.75..43.11 rows=1 width=10) (never executed)

116. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.62..42.94 rows=1 width=16) (never executed)

117. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.20..42.46 rows=1 width=16) (never executed)

118. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=4.78..18.38 rows=1 width=16) (never executed)

  • Join Filter: ((p_3.cid)::numeric = t_49.catalog)
119. 0.000 0.000 ↓ 0.0 0

Index Scan using m_person_f_link2reestr_idx on m_person p_3 (cost=0.42..8.44 rows=1 width=24) (never executed)

  • Index Cond: (f_link2reestr = t.id)
  • Filter: (f_uptodate AND (NOT deleted))
120. 0.000 0.000 ↓ 0.0 0

Materialize (cost=4.35..9.83 rows=6 width=5) (never executed)

121. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=4.35..9.80 rows=6 width=5) (never executed)

122. 0.000 0.000 ↓ 0.0 0

Seq Scan on userroles t1_2 (cost=0.00..1.30 rows=1 width=5) (never executed)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
123. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on urprivs t_49 (cost=4.35..8.44 rows=6 width=11) (never executed)

  • Recheck Cond: (((unitcode)::text = 'orgreestr'::text) AND (roleid = t1_2.roleid) AND (catalog IS NOT NULL))
124. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on i_urprivs_uc (cost=0.00..4.35 rows=6 width=0) (never executed)

  • Index Cond: (((unitcode)::text = 'orgreestr'::text) AND (roleid = t1_2.roleid) AND (catalog IS NOT NULL))
125. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declaration2child_f_child_idx on m_declaration2child t_48 (cost=0.42..24.03 rows=5 width=16) (never executed)

  • Index Cond: (f_child = p_3.id)
126. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declaration_id_idx on m_declaration t_47 (cost=0.42..0.47 rows=1 width=12) (never executed)

  • Index Cond: (id = t_48.f_decl)
  • Filter: (f_uptodate AND (NOT deleted))
127. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declarationtype_id_idx on m_declarationtype t_50 (cost=0.13..0.16 rows=1 width=6) (never executed)

  • Index Cond: (id = t_47.f_delc_type)
  • Filter: ((code)::text = ANY ('{0,1,2,3,4}'::text[]))
Planning time : 912.028 ms
Execution time : 215,010.819 ms