explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t6qf

Settings
# exclusive inclusive rows x rows loops node
1. 871.222 39,811.563 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,788.78..3,137.02 rows=1 width=4,235) (actual time=1,129.282..39,811.563 rows=26,611 loops=1)

2.          

CTE permitted_organizations

3. 1.760 76.705 ↓ 11.8 1,181 1

Hash Join (cost=3.01..86.25 rows=100 width=12) (actual time=74.119..76.705 rows=1,181 loops=1)

  • Hash Cond: (t_14.id = (unnest(d.d)))
4. 0.840 0.840 ↓ 1.0 1,183 1

Seq Scan on m_orgreestr t_14 (cost=0.00..77.81 rows=1,181 width=12) (actual time=0.002..0.840 rows=1,183 loops=1)

5. 0.879 74.105 ↓ 11.8 1,181 1

Hash (cost=1.76..1.76 rows=100 width=4) (actual time=74.105..74.105 rows=1,181 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 58kB
6. 73.226 73.226 ↓ 11.8 1,181 1

Function Scan on get_orgreestr_ids_by_permision_and_filter d (cost=0.26..0.76 rows=100 width=4) (actual time=71.983..73.226 rows=1,181 loops=1)

7. 96.693 4,825.039 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,702.40..2,737.99 rows=1 width=1,360) (actual time=1,127.815..4,825.039 rows=26,611 loops=1)

8. 92.958 4,621.902 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,702.27..2,737.83 rows=1 width=1,344) (actual time=1,127.804..4,621.902 rows=26,611 loops=1)

9. 94.931 4,422.500 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,702.14..2,737.67 rows=1 width=1,277) (actual time=1,127.794..4,422.500 rows=26,611 loops=1)

10. 99.413 4,221.125 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,702.00..2,737.50 rows=1 width=1,187) (actual time=1,127.782..4,221.125 rows=26,611 loops=1)

11. 102.620 4,015.268 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,701.87..2,737.35 rows=1 width=1,172) (actual time=1,127.771..4,015.268 rows=26,611 loops=1)

12. 101.175 3,806.204 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,701.73..2,737.18 rows=1 width=1,080) (actual time=1,127.760..3,806.204 rows=26,611 loops=1)

13. 85.364 3,598.585 ↓ 26,611.0 26,611 1

Nested Loop (cost=2,701.60..2,737.02 rows=1 width=1,025) (actual time=1,127.748..3,598.585 rows=26,611 loops=1)

14. 78.021 3,353.555 ↓ 26,611.0 26,611 1

Nested Loop Semi Join (cost=2,701.47..2,736.86 rows=1 width=1,018) (actual time=1,127.731..3,353.555 rows=26,611 loops=1)

15. 88.375 2,157.872 ↓ 13,305.5 26,611 1

Nested Loop (cost=2,701.19..2,735.37 rows=2 width=1,026) (actual time=1,127.505..2,157.872 rows=26,611 loops=1)

16. 92.584 1,829.998 ↓ 13,305.5 26,611 1

Nested Loop (cost=2,700.76..2,733.77 rows=2 width=541) (actual time=1,127.486..1,829.998 rows=26,611 loops=1)

17. 45.265 1,577.748 ↓ 13,305.5 26,611 1

Unique (cost=2,700.34..2,716.85 rows=2 width=16) (actual time=1,127.475..1,577.748 rows=26,611 loops=1)

18. 112.648 1,532.483 ↓ 13,305.5 26,611 1

Nested Loop (cost=2,700.34..2,716.85 rows=2 width=16) (actual time=1,127.474..1,532.483 rows=26,611 loops=1)

19. 45.477 1,206.947 ↓ 13,305.5 26,611 1

Unique (cost=2,699.92..2,699.93 rows=2 width=16) (actual time=1,127.452..1,206.947 rows=26,611 loops=1)

20. 66.047 1,161.470 ↓ 13,336.0 26,672 1

Sort (cost=2,699.92..2,699.93 rows=2 width=16) (actual time=1,127.449..1,161.470 rows=26,672 loops=1)

  • Sort Key: cr.id, t_11.priority DESC
  • Sort Method: quicksort Memory: 2852kB
21. 80.047 1,095.423 ↓ 13,336.0 26,672 1

Nested Loop (cost=4.37..2,699.91 rows=2 width=16) (actual time=79.498..1,095.423 rows=26,672 loops=1)

22. 74.359 935.360 ↓ 13,336.0 26,672 1

Nested Loop (cost=4.09..2,696.67 rows=2 width=16) (actual time=79.488..935.360 rows=26,672 loops=1)

23. 262.964 727.641 ↓ 13,336.0 26,672 1

Nested Loop (cost=3.67..2,682.02 rows=2 width=16) (actual time=79.471..727.641 rows=26,672 loops=1)

  • Join Filter: (edu.f_data_source = t_11.id)
  • Rows Removed by Join Filter: 293392
24. 37.691 251.301 ↓ 493.9 26,672 1

Nested Loop (cost=3.67..2,673.62 rows=54 width=20) (actual time=79.436..251.301 rows=26,672 loops=1)

25. 2.162 82.519 ↓ 11.8 1,181 1

Hash Join (cost=3.25..86.49 rows=100 width=16) (actual time=79.331..82.519 rows=1,181 loops=1)

  • Hash Cond: (t_12.id = perm_org.organization_reestr_id)
26. 1.047 1.047 ↓ 1.0 1,183 1

Seq Scan on m_orgreestr t_12 (cost=0.00..77.81 rows=1,181 width=12) (actual time=0.010..1.047 rows=1,183 loops=1)

27. 0.856 79.310 ↓ 11.8 1,181 1

Hash (cost=2.00..2.00 rows=100 width=4) (actual time=79.310..79.310 rows=1,181 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 58kB
28. 78.454 78.454 ↓ 11.8 1,181 1

CTE Scan on permitted_organizations perm_org (cost=0.00..2.00 rows=100 width=4) (actual time=74.123..78.454 rows=1,181 loops=1)

29. 131.091 131.091 ↓ 7.7 23 1,181

Index Scan using m_person_education_orgreestr_id_idx on m_person_education edu (cost=0.42..25.84 rows=3 width=16) (actual time=0.031..0.111 rows=23 loops=1,181)

  • Index Cond: (orgreestr_id = t_12.id)
  • Filter: (39 = ANY (learning_years))
  • Rows Removed by Filter: 85
30. 213.358 213.376 ↓ 1.3 12 26,672

Materialize (cost=0.00..1.14 rows=9 width=8) (actual time=0.001..0.008 rows=12 loops=26,672)

31. 0.018 0.018 ↓ 1.3 12 1

Seq Scan on m_dataresource t_11 (cost=0.00..1.09 rows=9 width=8) (actual time=0.009..0.018 rows=12 loops=1)

32. 133.360 133.360 ↑ 1.0 1 26,672

Index Scan using m_childreestr_id_idx on m_childreestr cr (cost=0.42..7.32 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=26,672)

  • Index Cond: (id = edu.childreestr_id)
  • Filter: (f_uptodate AND (NOT deleted))
33. 80.016 80.016 ↑ 1.0 1 26,672

Index Scan using m_organization_id_idx on m_organization t_13 (cost=0.28..1.61 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=26,672)

  • Index Cond: (id = t_12.f_max_priority)
34. 212.888 212.888 ↑ 1.0 1 26,611

Index Only Scan using m_childreestr_id_idx on m_childreestr t_10 (cost=0.42..8.44 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=26,611)

  • Index Cond: (id = cr.id)
  • Heap Fetches: 19683
35. 159.666 159.666 ↑ 1.0 1 26,611

Index Scan using m_childreestr_id_idx on m_childreestr t (cost=0.42..8.44 rows=1 width=533) (actual time=0.005..0.006 rows=1 loops=26,611)

  • Index Cond: (id = cr.id)
  • Filter: (f_uptodate AND (NOT deleted))
36. 239.499 239.499 ↑ 1.0 1 26,611

Index Scan using m_person_id_idx on m_person p (cost=0.42..0.79 rows=1 width=493) (actual time=0.008..0.009 rows=1 loops=26,611)

  • Index Cond: (id = t.f_max_priority)
  • Filter: (f_uptodate AND (NOT deleted))
37. 824.941 1,117.662 ↑ 1.0 1 26,611

Nested Loop (cost=0.29..0.74 rows=1 width=5) (actual time=0.042..0.042 rows=1 loops=26,611)

38. 133.055 133.055 ↑ 1.0 1 26,611

Index Scan using i_urprivs_cat on urprivs t_1 (cost=0.15..0.17 rows=1 width=10) (actual time=0.005..0.005 rows=1 loops=26,611)

  • Index Cond: ((catalog = (p.cid)::numeric) AND (catalog IS NOT NULL))
  • Filter: ((unitcode)::text = 'orgreestr'::text)
39. 159.666 159.666 ↑ 1.0 1 26,611

Index Only Scan using uk_userroles on userroles t1 (cost=0.14..0.56 rows=1 width=5) (actual time=0.006..0.006 rows=1 loops=26,611)

  • Index Cond: ((roleid = t_1.roleid) AND (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric))
  • Heap Fetches: 26611
40. 159.666 159.666 ↑ 1.0 1 26,611

Index Scan using m_gender_id_idx on m_gender t_2 (cost=0.13..0.15 rows=1 width=15) (actual time=0.004..0.006 rows=1 loops=26,611)

  • Index Cond: (id = p.f_gender)
41. 106.444 106.444 ↑ 1.0 1 26,611

Index Scan using m_citizenship_id_idx on m_citizenship t_3 (cost=0.13..0.15 rows=1 width=63) (actual time=0.003..0.004 rows=1 loops=26,611)

  • Index Cond: (id = p.f_citizenship)
42. 106.444 106.444 ↑ 1.0 1 26,611

Index Scan using m_difficultsituationlist_id_idx on m_difficultsituationlist t_4 (cost=0.14..0.16 rows=1 width=100) (actual time=0.003..0.004 rows=1 loops=26,611)

  • Index Cond: (id = p.f_difficultsituation)
43. 106.444 106.444 ↑ 1.0 1 26,611

Index Scan using m_fizgroup_id_idx on m_fizgroup t_5 (cost=0.13..0.15 rows=1 width=23) (actual time=0.003..0.004 rows=1 loops=26,611)

  • Index Cond: (id = p.f_fizgroup)
44. 106.444 106.444 ↑ 1.0 1 26,611

Index Scan using m_eduprogramadapt_id_idx on m_eduprogramadapt t_6 (cost=0.14..0.15 rows=1 width=98) (actual time=0.003..0.004 rows=1 loops=26,611)

  • Index Cond: (id = p.f_adapt_program_need)
45. 106.444 106.444 ↑ 1.0 1 26,611

Index Scan using m_medicgroup_id_idx on m_medicgroup t_7 (cost=0.14..0.15 rows=1 width=75) (actual time=0.003..0.004 rows=1 loops=26,611)

  • Index Cond: (id = p.f_healthgroup)
46. 106.444 106.444 ↑ 1.0 1 26,611

Index Scan using m_invgroup_id_idx on m_invgroup t_8 (cost=0.13..0.15 rows=1 width=24) (actual time=0.003..0.004 rows=1 loops=26,611)

  • Index Cond: (id = p.f_invgroup)
47. 106.444 106.444 ↑ 1.0 1 26,611

Index Scan using m_sickchildrenedutypes_id_idx on m_sickchildrenedutypes t_9 (cost=0.13..0.15 rows=1 width=64) (actual time=0.003..0.004 rows=1 loops=26,611)

  • Index Cond: (id = p.f_long_medic_need)
48.          

SubPlan (for Nested Loop)

49. 53.222 6,546.306 ↑ 1.0 1 26,611

Limit (cost=0.98..17.05 rows=1 width=94) (actual time=0.246..0.246 rows=1 loops=26,611)

50. 89.725 6,493.084 ↑ 1.0 1 26,611

Nested Loop (cost=0.98..17.05 rows=1 width=94) (actual time=0.244..0.244 rows=1 loops=26,611)

51. 80.702 6,306.807 ↑ 1.0 1 26,611

Nested Loop (cost=0.84..16.89 rows=1 width=8) (actual time=0.237..0.237 rows=1 loops=26,611)

52. 2,581.267 2,581.267 ↑ 1.0 1 26,611

Index Scan using m_documentchild2child_f_child_idx on m_documentchild2child t_15 (cost=0.42..8.44 rows=1 width=8) (actual time=0.097..0.097 rows=1 loops=26,611)

  • Index Cond: (f_child = t.f_max_priority)
53. 3,644.838 3,644.838 ↑ 1.0 1 24,138

Index Scan using m_documentchild_id_idx on m_documentchild t_16 (cost=0.42..8.44 rows=1 width=16) (actual time=0.151..0.151 rows=1 loops=24,138)

  • Index Cond: (id = t_15.f_document)
  • Filter: (f_uptodate AND (NOT deleted))
54. 96.552 96.552 ↑ 1.0 1 24,138

Index Scan using m_doctypes_id_idx on m_doctypes t_17 (cost=0.14..0.16 rows=1 width=98) (actual time=0.004..0.004 rows=1 loops=24,138)

  • Index Cond: (id = t_16.f_doc_type)
55. 53.222 478.998 ↑ 1.0 1 26,611

Limit (cost=0.98..17.05 rows=1 width=4) (actual time=0.017..0.018 rows=1 loops=26,611)

56. 87.252 425.776 ↑ 1.0 1 26,611

Nested Loop (cost=0.98..17.05 rows=1 width=4) (actual time=0.016..0.016 rows=1 loops=26,611)

57. 63.114 266.110 ↑ 1.0 1 26,611

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

58. 106.444 106.444 ↑ 1.0 1 26,611

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.004..0.004 rows=1 loops=26,611)

  • Index Cond: (f_child = t.f_max_priority)
59. 96.552 96.552 ↑ 1.0 1 24,138

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=24,138)

  • Index Cond: (id = t_18.f_document)
  • Filter: (f_uptodate AND (NOT deleted))
60. 72.414 72.414 ↑ 1.0 1 24,138

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=24,138)

  • Index Cond: (id = t_19.f_doc_type)
  • Heap Fetches: 24138
61. 53.222 319.332 ↑ 1.0 1 26,611

Limit (cost=0.84..16.89 rows=1 width=6) (actual time=0.011..0.012 rows=1 loops=26,611)

62. 63.114 266.110 ↑ 1.0 1 26,611

Nested Loop (cost=0.84..16.89 rows=1 width=6) (actual time=0.010..0.010 rows=1 loops=26,611)

63. 106.444 106.444 ↑ 1.0 1 26,611

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=26,611)

  • Index Cond: (f_child = t.f_max_priority)
64. 96.552 96.552 ↑ 1.0 1 24,138

Index Scan using m_documentchild_id_idx on m_documentchild t_22 (cost=0.42..8.44 rows=1 width=14) (actual time=0.004..0.004 rows=1 loops=24,138)

  • Index Cond: (id = t_21.f_document)
  • Filter: (f_uptodate AND (NOT deleted))
65. 79.833 319.332 ↑ 1.0 1 26,611

Limit (cost=0.84..16.89 rows=1 width=6) (actual time=0.011..0.012 rows=1 loops=26,611)

66. 63.114 239.499 ↑ 1.0 1 26,611

Nested Loop (cost=0.84..16.89 rows=1 width=6) (actual time=0.009..0.009 rows=1 loops=26,611)

67. 79.833 79.833 ↑ 1.0 1 26,611

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=26,611)

  • Index Cond: (f_child = t.f_max_priority)
68. 96.552 96.552 ↑ 1.0 1 24,138

Index Scan using m_documentchild_id_idx on m_documentchild t_24 (cost=0.42..8.44 rows=1 width=14) (actual time=0.004..0.004 rows=1 loops=24,138)

  • Index Cond: (id = t_23.f_document)
  • Filter: f_uptodate
69. 53.222 6,705.972 ↓ 0.0 0 26,611

Limit (cost=27.93..27.94 rows=1 width=233) (actual time=0.252..0.252 rows=0 loops=26,611)

70. 133.055 6,652.750 ↓ 0.0 0 26,611

Sort (cost=27.93..27.94 rows=1 width=233) (actual time=0.250..0.250 rows=0 loops=26,611)

  • Sort Key: t_25.id DESC
  • Sort Method: quicksort Memory: 25kB
71. 47.588 6,519.695 ↓ 0.0 0 26,611

Nested Loop (cost=5.30..27.92 rows=1 width=233) (actual time=0.243..0.245 rows=0 loops=26,611)

72. 65.146 6,466.473 ↓ 0.0 0 26,611

Nested Loop (cost=5.02..27.58 rows=1 width=12) (actual time=0.241..0.243 rows=0 loops=26,611)

73. 170.364 6,280.196 ↓ 0.0 0 26,611

Nested Loop (cost=4.73..27.17 rows=1 width=20) (actual time=0.235..0.236 rows=0 loops=26,611)

74. 1,118.732 5,747.976 ↑ 1.0 1 26,611

Nested Loop Semi Join (cost=0.42..15.16 rows=1 width=8) (actual time=0.193..0.216 rows=1 loops=26,611)

  • Join Filter: ((p_1.cid)::numeric = t_27.catalog)
  • Rows Removed by Join Filter: 38
75. 3,938.428 3,938.428 ↑ 1.0 1 26,611

Index Scan using m_person_f_link2reestr_idx on m_person p_1 (cost=0.42..8.44 rows=1 width=16) (actual time=0.139..0.148 rows=1 loops=26,611)

  • Index Cond: (f_link2reestr = t.id)
  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 0
76. 690.655 690.816 ↓ 1.6 32 32,896

Materialize (cost=0.00..6.37 rows=20 width=5) (actual time=0.001..0.021 rows=32 loops=32,896)

77. 0.049 0.161 ↓ 1.6 32 1

Nested Loop (cost=0.00..6.27 rows=20 width=5) (actual time=0.082..0.161 rows=32 loops=1)

  • Join Filter: (t_27.roleid = t1_1.roleid)
78. 0.055 0.055 ↑ 1.0 1 1

Seq Scan on userroles t1_1 (cost=0.00..1.06 rows=1 width=5) (actual time=0.055..0.055 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
79. 0.057 0.057 ↓ 1.1 32 1

Seq Scan on urprivs t_27 (cost=0.00..4.84 rows=30 width=10) (actual time=0.021..0.057 rows=32 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 141
80. 230.272 361.856 ↓ 0.0 0 32,896

Bitmap Heap Scan on m_preschoolchildeducation2child t_25 (cost=4.31..11.98 rows=2 width=28) (actual time=0.010..0.011 rows=0 loops=32,896)

  • Recheck Cond: (f_child = p_1.id)
  • Heap Blocks: exact=849
81. 131.584 131.584 ↓ 0.0 0 32,896

Bitmap Index Scan on m_preschoolchildeducation2child_f_child_idx (cost=0.00..4.30 rows=2 width=0) (actual time=0.004..0.004 rows=0 loops=32,896)

  • Index Cond: (f_child = p_1.id)
82. 121.131 121.131 ↑ 1.0 1 939

Index Scan using m_preschoolchildeducation_id_idx on m_preschoolchildeducation t_26 (cost=0.29..0.41 rows=1 width=4) (actual time=0.128..0.129 rows=1 loops=939)

  • Index Cond: (id = t_25.f_edu_do)
  • Filter: (f_uptodate AND (NOT deleted))
83. 5.634 5.634 ↑ 1.0 1 939

Index Scan using m_organization_id_idx on m_organization t_28 (cost=0.28..0.33 rows=1 width=237) (actual time=0.005..0.006 rows=1 loops=939)

  • Index Cond: (id = t_25.f_org)
  • Filter: (f_uptodate AND (NOT deleted))
84. 79.833 2,501.434 ↓ 0.0 0 26,611

Limit (cost=33.33..33.33 rows=1 width=233) (actual time=0.094..0.094 rows=0 loops=26,611)

85. 79.833 2,421.601 ↓ 0.0 0 26,611

Sort (cost=33.33..33.33 rows=1 width=233) (actual time=0.091..0.091 rows=0 loops=26,611)

  • Sort Key: t_29.id DESC
  • Sort Method: quicksort Memory: 25kB
86. 53.180 2,341.768 ↓ 0.0 0 26,611

Nested Loop (cost=5.30..33.32 rows=1 width=233) (actual time=0.088..0.088 rows=0 loops=26,611)

87. 20.683 2,288.546 ↓ 0.0 0 26,611

Nested Loop (cost=5.02..31.34 rows=1 width=12) (actual time=0.086..0.086 rows=0 loops=26,611)

88. 154.852 2,261.935 ↓ 0.0 0 26,611

Nested Loop (cost=4.75..30.92 rows=1 width=20) (actual time=0.085..0.085 rows=0 loops=26,611)

89. 1,065.510 1,942.603 ↑ 1.0 1 26,611

Nested Loop Semi Join (cost=0.42..15.16 rows=1 width=8) (actual time=0.058..0.073 rows=1 loops=26,611)

  • Join Filter: ((p_2.cid)::numeric = t_32.catalog)
  • Rows Removed by Join Filter: 38
90. 186.277 186.277 ↑ 1.0 1 26,611

Index Scan using m_person_f_link2reestr_idx on m_person p_2 (cost=0.42..8.44 rows=1 width=16) (actual time=0.005..0.007 rows=1 loops=26,611)

  • Index Cond: (f_link2reestr = t.id)
  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 0
91. 690.673 690.816 ↓ 1.6 32 32,896

Materialize (cost=0.00..6.37 rows=20 width=5) (actual time=0.001..0.021 rows=32 loops=32,896)

92. 0.051 0.143 ↓ 1.6 32 1

Nested Loop (cost=0.00..6.27 rows=20 width=5) (actual time=0.068..0.143 rows=32 loops=1)

  • Join Filter: (t_32.roleid = t1_2.roleid)
93. 0.046 0.046 ↑ 1.0 1 1

Seq Scan on userroles t1_2 (cost=0.00..1.06 rows=1 width=5) (actual time=0.046..0.046 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
94. 0.046 0.046 ↓ 1.1 32 1

Seq Scan on urprivs t_32 (cost=0.00..4.84 rows=30 width=10) (actual time=0.016..0.046 rows=32 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 141
95. 65.792 164.480 ↓ 0.0 0 32,896

Bitmap Heap Scan on m_mainchildeducation2child t_29 (cost=4.33..15.69 rows=7 width=28) (actual time=0.005..0.005 rows=0 loops=32,896)

  • Recheck Cond: (f_child = p_2.id)
  • Heap Blocks: exact=5
96. 98.688 98.688 ↓ 0.0 0 32,896

Bitmap Index Scan on m_mainchildeducation2child_f_child_idx (cost=0.00..4.33 rows=7 width=0) (actual time=0.003..0.003 rows=0 loops=32,896)

  • Index Cond: (f_child = p_2.id)
97. 5.928 5.928 ↑ 1.0 1 6

Index Scan using m_mainchildeducation_id_idx on m_mainchildeducation t_30 (cost=0.27..0.41 rows=1 width=4) (actual time=0.987..0.988 rows=1 loops=6)

  • Index Cond: (id = t_29.f_edu_oo)
  • Filter: (f_uptodate AND (NOT deleted))
98. 0.042 0.042 ↑ 1.0 1 6

Index Scan using m_organization_id_idx on m_organization t_31 (cost=0.28..1.97 rows=1 width=237) (actual time=0.006..0.007 rows=1 loops=6)

  • Index Cond: (id = t_29.f_org)
  • Filter: (f_uptodate AND (NOT deleted))
99. 79.833 2,182.102 ↑ 1.0 1 26,611

Aggregate (cost=25.06..25.07 rows=1 width=32) (actual time=0.082..0.082 rows=1 loops=26,611)

100. 53.222 2,102.269 ↓ 0.0 0 26,611

Unique (cost=25.04..25.05 rows=1 width=61) (actual time=0.079..0.079 rows=0 loops=26,611)

101. 106.444 2,049.047 ↓ 0.0 0 26,611

Sort (cost=25.04..25.04 rows=1 width=61) (actual time=0.077..0.077 rows=0 loops=26,611)

  • Sort Key: t_35.f_schoolname
  • Sort Method: quicksort Memory: 25kB
102. 26.611 1,942.603 ↓ 0.0 0 26,611

Nested Loop (cost=0.70..25.03 rows=1 width=61) (actual time=0.073..0.073 rows=0 loops=26,611)

  • Join Filter: (t_33.f_add_edu = t_34.id)
103. 53.222 1,915.992 ↓ 0.0 0 26,611

Nested Loop Semi Join (cost=0.70..23.78 rows=1 width=69) (actual time=0.072..0.072 rows=0 loops=26,611)

  • Join Filter: ((p_3.cid)::numeric = t_36.catalog)
104. 26.611 1,862.770 ↓ 0.0 0 26,611

Nested Loop (cost=0.70..17.06 rows=1 width=77) (actual time=0.070..0.070 rows=0 loops=26,611)

105. 919.885 1,836.159 ↓ 0.0 0 26,611

Nested Loop (cost=0.42..9.64 rows=1 width=24) (actual time=0.069..0.069 rows=0 loops=26,611)

  • Join Filter: (t_33.f_child = p_3.id)
  • Rows Removed by Join Filter: 38
106. 159.666 159.666 ↑ 1.0 1 26,611

Index Scan using m_person_f_link2reestr_idx on m_person p_3 (cost=0.42..8.44 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=26,611)

  • Index Cond: (f_link2reestr = t.id)
  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 0
107. 756.608 756.608 ↓ 3.4 31 32,896

Seq Scan on m_additionaledu2child t_33 (cost=0.00..1.09 rows=9 width=24) (actual time=0.002..0.023 rows=31 loops=32,896)

108. 0.000 0.000 ↓ 0.0 0

Index Scan using m_organization_id_idx on m_organization t_35 (cost=0.28..7.41 rows=1 width=69) (never executed)

  • Index Cond: (id = t_33.f_org)
109. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..6.37 rows=20 width=5) (never executed)

110. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..6.27 rows=20 width=5) (never executed)

  • Join Filter: (t_36.roleid = t1_3.roleid)
111. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on urprivs t_36 (cost=0.00..4.84 rows=30 width=10) (never executed)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
113. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_additionaledu t_34 (cost=0.00..1.11 rows=11 width=4) (never executed)

  • Filter: (f_uptodate AND (NOT deleted))
114. 133.055 12,214.449 ↑ 1.0 1 26,611

Aggregate (cost=24.38..24.39 rows=1 width=32) (actual time=0.458..0.459 rows=1 loops=26,611)

115. 79.833 12,081.394 ↑ 1.0 1 26,611

Unique (cost=24.36..24.36 rows=1 width=61) (actual time=0.452..0.454 rows=1 loops=26,611)

116. 186.277 12,001.561 ↑ 1.0 1 26,611

Sort (cost=24.36..24.36 rows=1 width=61) (actual time=0.450..0.451 rows=1 loops=26,611)

  • Sort Key: t_39.f_schoolname
  • Sort Method: quicksort Memory: 25kB
117. 160.772 11,815.284 ↑ 1.0 1 26,611

Nested Loop (cost=1.41..24.35 rows=1 width=61) (actual time=0.224..0.444 rows=1 loops=26,611)

118. 153.142 11,495.952 ↑ 1.0 1 26,611

Nested Loop (cost=1.14..24.03 rows=1 width=8) (actual time=0.217..0.432 rows=1 loops=26,611)

119. 1,037.068 4,523.870 ↑ 1.0 1 26,611

Nested Loop Semi Join (cost=0.84..23.61 rows=1 width=16) (actual time=0.103..0.170 rows=1 loops=26,611)

  • Join Filter: ((p_4.cid)::numeric = t_40.catalog)
  • Rows Removed by Join Filter: 37
120. 193.900 2,820.766 ↑ 1.0 1 26,611

Nested Loop (cost=0.84..16.89 rows=1 width=24) (actual time=0.051..0.106 rows=1 loops=26,611)

121. 159.666 159.666 ↑ 1.0 1 26,611

Index Scan using m_person_f_link2reestr_idx on m_person p_4 (cost=0.42..8.44 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=26,611)

  • Index Cond: (f_link2reestr = t.id)
  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 0
122. 2,467.200 2,467.200 ↑ 1.0 1 32,896

Index Scan using m_middleprofeducation2child_f_child_idx on m_middleprofeducation2child t_37 (cost=0.42..8.44 rows=1 width=24) (actual time=0.059..0.075 rows=1 loops=32,896)

  • Index Cond: (f_child = p_4.id)
123. 665.874 666.036 ↓ 1.6 32 31,716

Materialize (cost=0.00..6.37 rows=20 width=5) (actual time=0.001..0.021 rows=32 loops=31,716)

124. 0.051 0.162 ↓ 1.6 32 1

Nested Loop (cost=0.00..6.27 rows=20 width=5) (actual time=0.085..0.162 rows=32 loops=1)

  • Join Filter: (t_40.roleid = t1_4.roleid)
125. 0.060 0.060 ↑ 1.0 1 1

Seq Scan on userroles t1_4 (cost=0.00..1.06 rows=1 width=5) (actual time=0.060..0.060 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
126. 0.051 0.051 ↓ 1.1 32 1

Seq Scan on urprivs t_40 (cost=0.00..4.84 rows=30 width=10) (actual time=0.019..0.051 rows=32 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 141
127. 6,818.940 6,818.940 ↑ 1.0 1 31,716

Index Scan using m_middleprofeducation_id_idx on m_middleprofeducation t_38 (cost=0.29..0.41 rows=1 width=4) (actual time=0.214..0.215 rows=1 loops=31,716)

  • Index Cond: (id = t_37.f_edu_spo)
  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 0
128. 158.560 158.560 ↑ 1.0 1 31,712

Index Scan using m_organization_id_idx on m_organization t_39 (cost=0.28..0.30 rows=1 width=69) (actual time=0.004..0.005 rows=1 loops=31,712)

  • Index Cond: (id = t_37.f_org)
129. 53.222 691.886 ↑ 1.0 1 26,611

Aggregate (cost=27.84..27.85 rows=1 width=32) (actual time=0.026..0.026 rows=1 loops=26,611)

130. 53.222 638.664 ↓ 0.0 0 26,611

Unique (cost=27.81..27.82 rows=1 width=61) (actual time=0.024..0.024 rows=0 loops=26,611)

131. 106.444 585.442 ↓ 0.0 0 26,611

Sort (cost=27.81..27.82 rows=1 width=61) (actual time=0.022..0.022 rows=0 loops=26,611)

  • Sort Key: t_43.f_schoolname
  • Sort Method: quicksort Memory: 25kB
132. 53.222 478.998 ↓ 0.0 0 26,611

Nested Loop (cost=0.98..27.80 rows=1 width=61) (actual time=0.018..0.018 rows=0 loops=26,611)

133. 26.611 425.776 ↓ 0.0 0 26,611

Nested Loop (cost=0.70..23.81 rows=1 width=8) (actual time=0.016..0.016 rows=0 loops=26,611)

134. 53.222 399.165 ↓ 0.0 0 26,611

Nested Loop Semi Join (cost=0.57..23.34 rows=1 width=16) (actual time=0.015..0.015 rows=0 loops=26,611)

  • Join Filter: ((p_5.cid)::numeric = t_44.catalog)
135. 93.874 345.943 ↓ 0.0 0 26,611

Nested Loop (cost=0.57..16.61 rows=1 width=24) (actual time=0.013..0.013 rows=0 loops=26,611)

136. 186.277 186.277 ↑ 1.0 1 26,611

Index Scan using m_person_f_link2reestr_idx on m_person p_5 (cost=0.42..8.44 rows=1 width=16) (actual time=0.006..0.007 rows=1 loops=26,611)

  • Index Cond: (f_link2reestr = t.id)
  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 0
137. 65.792 65.792 ↓ 0.0 0 32,896

Index Scan using m_professionaledu2child_f_child_idx on m_professionaledu2child t_41 (cost=0.14..8.16 rows=1 width=24) (actual time=0.002..0.002 rows=0 loops=32,896)

  • Index Cond: (f_child = p_5.id)
138. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..6.37 rows=20 width=5) (never executed)

139. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..6.27 rows=20 width=5) (never executed)

  • Join Filter: (t_44.roleid = t1_5.roleid)
140. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on urprivs t_44 (cost=0.00..4.84 rows=30 width=10) (never executed)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
142. 0.000 0.000 ↓ 0.0 0

Index Scan using m_professionaledu_id_idx on m_professionaledu t_42 (cost=0.14..0.47 rows=1 width=4) (never executed)

  • Index Cond: (id = t_41.f_edu_prof)
  • Filter: (f_uptodate AND (NOT deleted))
143. 0.000 0.000 ↓ 0.0 0

Index Scan using m_organization_id_idx on m_organization t_43 (cost=0.28..3.98 rows=1 width=69) (never executed)

  • Index Cond: (id = t_41.f_org)
144. 0.000 0.000 ↓ 0.0 0

Subquery Scan on data (cost=10.94..45.74 rows=1 width=32) (never executed)

145.          

Initplan (for Subquery Scan)

146. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

GroupAggregate (cost=1.27..36.03 rows=1 width=40) (never executed)

  • Group Key: p_6.f_link2reestr
156. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.27..36.00 rows=1 width=10) (never executed)

157. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.14..35.84 rows=1 width=16) (never executed)

158. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=0.84..35.46 rows=1 width=16) (never executed)

  • Join Filter: ((p_6.cid)::numeric = t_56.catalog)
159. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..28.73 rows=1 width=24) (never executed)

160. 0.000 0.000 ↓ 0.0 0

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

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

Index Scan using m_declaration2child_f_child_idx on m_declaration2child t_55 (cost=0.42..20.25 rows=4 width=16) (never executed)

  • Index Cond: (f_child = p_6.id)
162. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..6.37 rows=20 width=5) (never executed)

163. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..6.27 rows=20 width=5) (never executed)

  • Join Filter: (t_56.roleid = t1_6.roleid)
164. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on urprivs t_56 (cost=0.00..4.84 rows=30 width=10) (never executed)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
166. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declaration_id_idx on m_declaration t_54 (cost=0.29..0.37 rows=1 width=12) (never executed)

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

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

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

Subquery Scan on data_1 (cost=10.99..45.78 rows=1 width=32) (never executed)

169.          

Initplan (for Subquery Scan)

170. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

GroupAggregate (cost=1.27..36.03 rows=1 width=40) (never executed)

  • Group Key: p_7.f_link2reestr
180. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.27..36.00 rows=1 width=10) (never executed)

181. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.14..35.84 rows=1 width=16) (never executed)

182. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=0.84..35.46 rows=1 width=16) (never executed)

  • Join Filter: ((p_7.cid)::numeric = t_69.catalog)
183. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..28.73 rows=1 width=24) (never executed)

184. 0.000 0.000 ↓ 0.0 0

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

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

Index Scan using m_declaration2child_f_child_idx on m_declaration2child t_68 (cost=0.42..20.25 rows=4 width=16) (never executed)

  • Index Cond: (f_child = p_7.id)
186. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..6.37 rows=20 width=5) (never executed)

187. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..6.27 rows=20 width=5) (never executed)

  • Join Filter: (t_69.roleid = t1_7.roleid)
188. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on urprivs t_69 (cost=0.00..4.84 rows=30 width=10) (never executed)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
190. 0.000 0.000 ↓ 0.0 0

Index Scan using m_declaration_id_idx on m_declaration t_67 (cost=0.29..0.37 rows=1 width=12) (never executed)

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

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

  • Index Cond: (id = t_67.f_delc_type)
  • Filter: ((code)::text = ANY ('{0,1,2,3,4}'::text[]))
192. 212.888 2,049.047 ↑ 1.0 1 26,611

Index Scan using pk_catalogs on catalogs t_73 (cost=0.14..14.64 rows=1 width=54) (actual time=0.075..0.077 rows=1 loops=26,611)

  • Index Cond: (id = (t_13.cid)::numeric)
  • Filter: (CASE WHEN (alternatives: SubPlan 31 or hashed SubPlan 32) THEN 1 ELSE NULL::integer END = 1)
193.          

SubPlan (for Index Scan)

194. 186.277 1,836.159 ↑ 1.0 1 26,611

Nested Loop (cost=0.00..6.48 rows=1 width=0) (actual time=0.069..0.069 rows=1 loops=26,611)

  • Join Filter: (t_71.roleid = t1_8.roleid)
195. 745.108 745.108 ↑ 1.0 1 26,611

Seq Scan on urprivs t_71 (cost=0.00..5.40 rows=1 width=5) (actual time=0.028..0.028 rows=1 loops=26,611)

  • Filter: ((catalog = t_73.id) AND ((unitcode)::text = (t_73.c_unitcode)::text))
  • Rows Removed by Filter: 179
196. 904.774 904.774 ↑ 1.0 1 26,611

Seq Scan on userroles t1_8 (cost=0.00..1.06 rows=1 width=5) (actual time=0.034..0.034 rows=1 loops=26,611)

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

Hash Join (cost=1.07..7.68 rows=149 width=37) (never executed)

  • Hash Cond: (t_72.roleid = t1_9.roleid)
198. 0.000 0.000 ↓ 0.0 0

Seq Scan on urprivs t_72 (cost=0.00..4.27 rows=227 width=22) (never executed)

199. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.06..1.06 rows=1 width=5) (never executed)

200. 0.000 0.000 ↓ 0.0 0

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

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
Planning time : 39.241 ms
Execution time : 39,841.228 ms