explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DCuI

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.009 163,259.504 ↓ 6.2 50 1

Limit (cost=77,471.76..1,055,325.70 rows=8 width=2,704) (actual time=162,834.281..163,259.504 rows=50 loops=1)

2.          

CTE permitted_organizations

3. 0.320 35.560 ↓ 5.5 547 1

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

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

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

5. 0.090 35.038 ↓ 5.5 547 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
6. 34.948 34.948 ↓ 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=34.882..34.948 rows=547 loops=1)

7. 0.505 163,259.495 ↓ 6.2 50 1

Nested Loop (cost=77,385.31..1,055,239.25 rows=8 width=2,704) (actual time=162,834.281..163,259.495 rows=50 loops=1)

  • Join Filter: (p.f_long_medic_need = t_9.id)
  • Rows Removed by Join Filter: 147
8. 0.067 162,782.340 ↓ 6.2 50 1

Nested Loop (cost=77,385.31..1,053,848.80 rows=8 width=1,465) (actual time=162,782.063..162,782.340 rows=50 loops=1)

  • Join Filter: (p.f_invgroup = t_8.id)
  • Rows Removed by Join Filter: 196
9. 0.022 162,782.223 ↓ 6.2 50 1

Nested Loop (cost=77,385.31..1,053,847.14 rows=8 width=1,449) (actual time=162,782.051..162,782.223 rows=50 loops=1)

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

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

11. 0.095 162,782.192 ↓ 6.6 53 1

Materialize (cost=77,385.31..1,053,844.99 rows=8 width=1,382) (actual time=162,782.038..162,782.192 rows=53 loops=1)

12. 2.024 162,782.097 ↓ 6.6 53 1

Nested Loop (cost=77,385.31..1,053,844.95 rows=8 width=1,382) (actual time=162,782.033..162,782.097 rows=53 loops=1)

  • Join Filter: (p.f_adapt_program_need = t_6.id)
  • Rows Removed by Join Filter: 3372
13. 0.003 0.003 ↑ 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.003 rows=2 loops=1)

14. 4.825 162,780.070 ↓ 214.0 1,712 2

Materialize (cost=77,385.31..1,053,842.15 rows=8 width=1,292) (actual time=856.215..81,390.035 rows=1,712 loops=2)

15. 61.956 162,775.245 ↓ 421.5 3,372 1

Merge Right Join (cost=77,385.31..1,053,842.11 rows=8 width=1,292) (actual time=1,712.426..162,775.245 rows=3,372 loops=1)

  • Merge Cond: (p_1.childreestr_id = t.id)
16. 2,325.064 6,230.874 ↓ 1.1 168,840 1

GroupAggregate (cost=67,674.88..1,010,933.89 rows=147,259 width=164) (actual time=560.386..6,230.874 rows=168,840 loops=1)

  • Group Key: p_1.childreestr_id
17. 455.946 697.850 ↑ 1.0 284,410 1

Sort (cost=67,674.88..68,385.92 rows=284,417 width=195) (actual time=560.248..697.850 rows=284,410 loops=1)

  • Sort Key: p_1.childreestr_id
  • Sort Method: external merge Disk: 60872kB
18. 85.450 241.904 ↑ 1.0 284,417 1

Hash Join (cost=612.40..14,687.04 rows=284,417 width=195) (actual time=3.472..241.904 rows=284,417 loops=1)

  • Hash Cond: (p_1.edu_level_id = t_11.id)
19. 117.318 156.445 ↑ 1.0 284,417 1

Hash Join (cost=611.27..10,775.17 rows=284,417 width=197) (actual time=3.456..156.445 rows=284,417 loops=1)

  • Hash Cond: (p_1.orgreestr_id = t_10.id)
20. 35.685 35.685 ↑ 1.0 284,417 1

Seq Scan on m_person_education p_1 (cost=0.00..6,253.17 rows=284,417 width=16) (actual time=0.006..35.685 rows=284,417 loops=1)

21. 0.423 3.442 ↑ 1.0 1,341 1

Hash (cost=594.50..594.50 rows=1,341 width=189) (actual time=3.442..3.442 rows=1,341 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 293kB
22. 1.530 3.019 ↑ 1.0 1,341 1

Hash Join (cost=94.17..594.50 rows=1,341 width=189) (actual time=0.708..3.019 rows=1,341 loops=1)

  • Hash Cond: (t_12.id = t_10.f_max_priority)
23. 0.794 0.794 ↑ 1.0 2,758 1

Seq Scan on m_organization t_12 (cost=0.00..476.58 rows=2,758 width=193) (actual time=0.003..0.794 rows=2,758 loops=1)

24. 0.242 0.695 ↑ 1.0 1,341 1

Hash (cost=77.41..77.41 rows=1,341 width=12) (actual time=0.695..0.695 rows=1,341 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 79kB
25. 0.453 0.453 ↑ 1.0 1,341 1

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

26. 0.004 0.009 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=6) (actual time=0.009..0.009 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
27. 0.005 0.005 ↑ 1.0 6 1

Seq Scan on m_actionsedulevels t_11 (cost=0.00..1.06 rows=6 width=6) (actual time=0.003..0.005 rows=6 loops=1)

28.          

SubPlan (for GroupAggregate)

29. 506.520 675.360 ↑ 1.0 1 168,840

Aggregate (cost=1.25..1.26 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=168,840)

30. 168.840 168.840 ↓ 0.0 0 168,840

Function Scan on unnest d_1 (cost=0.00..1.00 rows=100 width=32) (actual time=0.001..0.001 rows=0 loops=168,840)

31. 337.680 506.520 ↑ 1.0 1 168,840

Aggregate (cost=1.25..1.26 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=168,840)

32. 168.840 168.840 ↓ 0.0 0 168,840

Function Scan on unnest d_2 (cost=0.00..1.00 rows=100 width=32) (actual time=0.001..0.001 rows=0 loops=168,840)

33. 337.680 506.520 ↑ 1.0 1 168,840

Aggregate (cost=1.25..1.26 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=168,840)

34. 168.840 168.840 ↓ 0.0 0 168,840

Function Scan on unnest d_3 (cost=0.00..1.00 rows=100 width=32) (actual time=0.001..0.001 rows=0 loops=168,840)

35. 675.360 1,013.040 ↑ 1.0 1 168,840

Aggregate (cost=1.25..1.26 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=168,840)

36. 337.680 337.680 ↑ 100.0 1 168,840

Function Scan on unnest d_4 (cost=0.00..1.00 rows=100 width=32) (actual time=0.002..0.002 rows=1 loops=168,840)

37. 337.680 506.520 ↑ 1.0 1 168,840

Aggregate (cost=1.25..1.26 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=168,840)

38. 168.840 168.840 ↓ 0.0 0 168,840

Function Scan on unnest d_5 (cost=0.00..1.00 rows=100 width=32) (actual time=0.001..0.001 rows=0 loops=168,840)

39. 6.050 156,482.415 ↓ 421.5 3,372 1

Materialize (cost=9,710.44..41,067.44 rows=8 width=1,132) (actual time=1,149.354..156,482.415 rows=3,372 loops=1)

40. 2.991 156,476.365 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,067.42 rows=8 width=1,132) (actual time=1,149.351..156,476.365 rows=3,372 loops=1)

  • Join Filter: (p.f_fizgroup = t_5.id)
  • Rows Removed by Join Filter: 10116
41. 14.753 156,470.002 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,065.89 rows=8 width=1,117) (actual time=1,149.343..156,470.002 rows=3,372 loops=1)

  • Join Filter: (p.f_difficultsituation = t_4.id)
  • Rows Removed by Join Filter: 97788
42. 3.458 156,448.505 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,060.91 rows=8 width=1,025) (actual time=1,149.333..156,448.505 rows=3,372 loops=1)

  • Join Filter: (p.f_citizenship = t_3.id)
  • Rows Removed by Join Filter: 13488
43. 6.087 156,441.675 ↓ 421.5 3,372 1

Nested Loop (cost=9,710.44..41,059.25 rows=8 width=970) (actual time=1,149.324..156,441.675 rows=3,372 loops=1)

  • Join Filter: (p.f_gender = t_2.id)
  • Rows Removed by Join Filter: 6744
44. 5.263 156,432.216 ↓ 421.5 3,372 1

Nested Loop Semi Join (cost=9,710.44..41,057.85 rows=8 width=963) (actual time=1,149.307..156,432.216 rows=3,372 loops=1)

45. 38.549 156,234.749 ↓ 210.8 3,372 1

Nested Loop (cost=9,710.02..41,039.98 rows=16 width=971) (actual time=1,138.091..156,234.749 rows=3,372 loops=1)

46. 79.769 1,634.087 ↓ 69.1 74,273 1

Nested Loop (cost=9,709.59..39,769.06 rows=1,075 width=533) (actual time=786.350..1,634.087 rows=74,273 loops=1)

47. 33.997 1,331.499 ↓ 30.5 74,273 1

Unique (cost=9,709.17..24,748.04 rows=2,437 width=16) (actual time=786.343..1,331.499 rows=74,273 loops=1)

48. 64.709 1,297.502 ↓ 30.5 74,273 1

Nested Loop (cost=9,709.17..24,741.95 rows=2,437 width=16) (actual time=786.341..1,297.502 rows=74,273 loops=1)

49. 32.887 861.428 ↓ 30.5 74,273 1

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

50. 85.247 828.541 ↓ 30.5 74,385 1

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

  • Sort Key: cr.id, t_14.priority DESC
  • Sort Method: quicksort Memory: 6559kB
51. 37.934 743.294 ↓ 30.5 74,385 1

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

  • Hash Cond: (p_2.f_data_source = t_14.id)
52. 51.716 705.334 ↓ 30.5 74,385 1

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

53. 16.787 356.078 ↓ 13.5 74,385 1

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

54. 0.433 39.535 ↓ 5.5 547 1

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

55. 0.604 36.914 ↓ 5.5 547 1

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

  • Hash Cond: (t_15.id = perm_org.organization_reestr_id)
56. 0.436 0.436 ↑ 1.0 1,341 1

Seq Scan on m_orgreestr t_15 (cost=0.00..77.41 rows=1,341 width=12) (actual time=0.007..0.436 rows=1,341 loops=1)

57. 0.093 35.874 ↓ 5.5 547 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
58. 35.781 35.781 ↓ 5.5 547 1

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

59. 2.188 2.188 ↑ 1.0 1 547

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

  • Index Cond: (id = t_15.f_max_priority)
  • Heap Fetches: 547
60. 299.756 299.756 ↑ 1.0 136 547

Index Scan using m_person_education_orgreestr_id_idx on m_person_education p_2 (cost=0.42..29.07 rows=140 width=16) (actual time=0.014..0.548 rows=136 loops=547)

  • Index Cond: (orgreestr_id = t_15.id)
  • Filter: (39 = ANY (learning_years))
  • Rows Removed by Filter: 384
61. 297.540 297.540 ↑ 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.004..0.004 rows=1 loops=74,385)

  • Index Cond: (id = p_2.childreestr_id)
  • Filter: (f_uptodate AND (NOT deleted))
62. 0.004 0.026 ↑ 1.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
63. 0.022 0.022 ↑ 1.0 5 1

Seq Scan on m_dataresource t_14 (cost=0.00..1.05 rows=5 width=8) (actual time=0.020..0.022 rows=5 loops=1)

64. 371.365 371.365 ↑ 1.0 1 74,273

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

  • Index Cond: (id = cr.id)
  • Heap Fetches: 74273
65. 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))
66. 154,562.113 154,562.113 ↓ 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.081..2.081 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
67. 138.252 192.204 ↑ 1.0 1 3,372

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

68. 33.720 33.720 ↑ 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.010..0.010 rows=1 loops=3,372)

  • Index Cond: ((catalog = (p.cid)::numeric) AND (catalog IS NOT NULL))
  • Filter: ((unitcode)::text = 'orgreestr'::text)
69. 20.232 20.232 ↑ 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.006..0.006 rows=1 loops=3,372)

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

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

71. 0.009 0.009 ↑ 1.0 3 1

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

72. 3.367 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)

73. 0.005 0.005 ↑ 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.005 rows=5 loops=1)

74. 6.735 6.744 ↑ 1.0 30 3,372

Materialize (cost=0.00..1.45 rows=30 width=100) (actual time=0.000..0.002 rows=30 loops=3,372)

75. 0.009 0.009 ↑ 1.0 30 1

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

76. 3.367 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)

77. 0.005 0.005 ↑ 1.0 4 1

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

78. 0.041 0.050 ↑ 1.0 5 50

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

79. 0.009 0.009 ↑ 1.0 5 1

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

80. 0.044 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)

81. 0.006 0.006 ↑ 1.0 4 1

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

82.          

SubPlan (for Nested Loop)

83. 0.050 475.400 ↑ 1.0 1 50

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

84. 0.115 475.350 ↑ 1.0 1 50

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

85. 0.127 475.050 ↑ 1.0 1 50

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

86. 250.000 250.000 ↑ 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=5.000..5.000 rows=1 loops=50)

  • Index Cond: (f_child = t.f_max_priority)
87. 224.923 224.923 ↑ 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=6.079..6.079 rows=1 loops=37)

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

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

  • Index Cond: (id = t_19.f_doc_type)
89. 0.050 0.600 ↑ 1.0 1 50

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

90. 0.039 0.550 ↑ 1.0 1 50

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

91. 0.052 0.400 ↑ 1.0 1 50

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

92. 0.200 0.200 ↑ 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.004..0.004 rows=1 loops=50)

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

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

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

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

  • Index Cond: (id = t_22.f_doc_type)
  • Heap Fetches: 37
95. 0.050 0.300 ↑ 1.0 1 50

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

96. 0.039 0.250 ↑ 1.0 1 50

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

97. 0.100 0.100 ↑ 1.0 1 50

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

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

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

  • Index Cond: (id = t_24.f_document)
  • Filter: (f_uptodate AND (NOT deleted))
99. 0.050 0.300 ↑ 1.0 1 50

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

100. 0.039 0.250 ↑ 1.0 1 50

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

101. 0.100 0.100 ↑ 1.0 1 50

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

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

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

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

Subquery Scan on data (cost=15.43..52.84 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_28 (cost=0.00..1.07 rows=1 width=23) (never executed)

  • Filter: ((code)::text = '3'::text)
106. 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 = '1'::text)
107. 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 = '2'::text)
108. 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 = '3'::text)
109. 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 = '0'::text)
110. 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 = '1'::text)
111. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Seq Scan on m_declarationtype t_36 (cost=0.00..1.07 rows=1 width=23) (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_39.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_1 (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_39 (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))
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_1.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_38 (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_37 (cost=0.42..0.47 rows=1 width=12) (never executed)

  • Index Cond: (id = t_38.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_40 (cost=0.13..0.16 rows=1 width=6) (never executed)

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

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

129.          

Initplan (for Subquery Scan)

130. 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)
131. 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 = '1'::text)
132. 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 = '2'::text)
133. 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 = '3'::text)
134. 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 = '0'::text)
135. 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 = '1'::text)
136. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

  • Group Key: p_4.f_link2reestr
140. 0.000 0.000 ↓ 0.0 0

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

141. 0.000 0.000 ↓ 0.0 0

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

142. 0.000 0.000 ↓ 0.0 0

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

143. 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_4.cid)::numeric = t_52.catalog)
144. 0.000 0.000 ↓ 0.0 0

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

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

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

146. 0.000 0.000 ↓ 0.0 0

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

147. 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)
148. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on urprivs t_52 (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))
149. 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))
150. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (f_child = p_4.id)
151. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (id = t_50.f_delc_type)
  • Filter: ((code)::text = ANY ('{0,1,2,3,4}'::text[]))
Planning time : 29.156 ms
Execution time : 163,276.631 ms