explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E8SBW

Settings
# exclusive inclusive rows x rows loops node
1. 488.503 74,161.507 ↓ 24.8 229,361 1

Hash Join (cost=601,934.24..673,516.56 rows=9,264 width=5,248) (actual time=68,848.344..74,161.507 rows=229,361 loops=1)

  • Hash Cond: ((p.cid)::numeric = t_1.catalog)
2. 801.259 73,672.287 ↓ 12.4 229,361 1

Nested Loop (cost=601,928.69..673,418.15 rows=18,527 width=5,256) (actual time=68,847.573..73,672.287 rows=229,361 loops=1)

3. 637.450 71,494.862 ↓ 12.4 229,361 1

Nested Loop (cost=601,928.26..653,937.21 rows=18,527 width=5,248) (actual time=68,847.549..71,494.862 rows=229,361 loops=1)

4. 314.301 69,710.607 ↓ 12.4 229,361 1

Unique (cost=601,927.84..602,066.79 rows=18,527 width=4) (actual time=68,828.457..69,710.607 rows=229,361 loops=1)

5. 333.493 69,396.306 ↓ 12.4 229,361 1

Group (cost=601,927.84..602,020.48 rows=18,527 width=4) (actual time=68,828.455..69,396.306 rows=229,361 loops=1)

  • Group Key: cr.id
6. 598.347 69,062.813 ↓ 13.1 241,798 1

Sort (cost=601,927.84..601,974.16 rows=18,527 width=4) (actual time=68,828.451..69,062.813 rows=241,798 loops=1)

  • Sort Key: cr.id
  • Sort Method: quicksort Memory: 17,479kB
7. 462.983 68,464.466 ↓ 13.1 241,798 1

Hash Join (cost=15,749.60..600,614.52 rows=18,527 width=4) (actual time=14,916.756..68,464.466 rows=241,798 loops=1)

  • Hash Cond: (((NULL::integer)::bigint) = cr.id)
8. 293.045 67,238.554 ↓ 3.3 241,945 1

Append (cost=0.00..583,660.68 rows=74,107 width=16) (actual time=0.005..67,238.554 rows=241,945 loops=1)

9. 0.006 0.008 ↑ 1.0 1 1

Subquery Scan on *SELECT* 1 (cost=0.00..0.03 rows=1 width=16) (actual time=0.005..0.008 rows=1 loops=1)

10. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=1)

11. 173.946 14,216.862 ↓ 2.0 63,069 1

HashAggregate (cost=146,242.23..146,556.62 rows=31,439 width=16) (actual time=14,152.273..14,216.862 rows=63,069 loops=1)

  • Group Key: t_5.f_link2reestr, p_1.f_link2reestr
12. 193.658 14,042.916 ↓ 2.0 63,098 1

Nested Loop (cost=35,819.63..146,085.03 rows=31,439 width=16) (actual time=1,564.019..14,042.916 rows=63,098 loops=1)

13. 187.465 13,347.526 ↓ 28.9 71,676 1

Hash Join (cost=35,819.49..143,522.24 rows=2,482 width=20) (actual time=1,564.004..13,347.526 rows=71,676 loops=1)

  • Hash Cond: ((p_1.cid)::numeric = t_2.catalog)
14. 271.495 13,159.443 ↓ 14.4 71,676 1

Nested Loop (cost=35,813.93..143,491.81 rows=4,964 width=28) (actual time=1,563.332..13,159.443 rows=71,676 loops=1)

15. 3,944.482 12,294.780 ↓ 3.7 74,146 1

Nested Loop (cost=35,813.50..131,879.26 rows=19,957 width=20) (actual time=1,563.303..12,294.780 rows=74,146 loops=1)

  • Join Filter: (((now() >= t_6.begin) AND (now() <= t_6."end") AND (f_get_learning_status_by_date(t_4.f_enroll_date, t_4.f_exclude_date, (now())::date) IS TRUE)) OR (((now() < t_6.begin) OR (now() > t_6."end")) AND (t_4.f_enroll_date < t_6."end") AND ((t_4.f_exclude_date IS NULL) OR (t_4.f_exclude_date > t_6.begin))))
  • Rows Removed by Join Filter: 710,456
16. 0.055 0.055 ↑ 1.0 1 1

Seq Scan on m_years t_6 (cost=0.00..4.71 rows=1 width=8) (actual time=0.037..0.055 rows=1 loops=1)

  • Filter: ((id = 6) AND (((now() >= begin) AND (now() <= "end")) OR (now() < begin) OR (now() > "end")))
  • Rows Removed by Filter: 113
17. 1,859.079 8,350.243 ↓ 6.3 784,602 1

Hash Join (cost=35,813.50..95,808.70 rows=124,365 width=24) (actual time=1,500.510..8,350.243 rows=784,602 loops=1)

  • Hash Cond: (t_3.f_org = t_5.id)
18. 3,544.401 6,485.378 ↓ 3.5 1,753,153 1

Hash Join (cost=34,987.38..91,873.93 rows=497,332 width=24) (actual time=1,494.683..6,485.378 rows=1,753,153 loops=1)

  • Hash Cond: (t_3.f_edu_do = t_4.id)
19. 1,447.207 1,447.207 ↑ 1.0 1,989,326 1

Seq Scan on m_preschoolchildeducation2child t_3 (cost=0.00..44,453.26 rows=1,989,326 width=24) (actual time=0.022..1,447.207 rows=1,989,326 loops=1)

20. 702.500 1,493.770 ↓ 3.2 773,704 1

Hash (cost=31,994.43..31,994.43 rows=239,436 width=12) (actual time=1,493.770..1,493.770 rows=773,704 loops=1)

  • Buckets: 1,048,576 (originally 262144) Batches: 1 (originally 1) Memory Usage: 41,157kB
21. 791.270 791.270 ↓ 3.2 773,704 1

Seq Scan on m_preschoolchildeducation t_4 (cost=0.00..31,994.43 rows=239,436 width=12) (actual time=0.022..791.270 rows=773,704 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 184,039
22. 0.970 5.786 ↓ 1.1 1,097 1

Hash (cost=813.95..813.95 rows=974 width=16) (actual time=5.786..5.786 rows=1,097 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 68kB
23. 4.816 4.816 ↓ 1.1 1,097 1

Seq Scan on m_organization t_5 (cost=0.00..813.95 rows=974 width=16) (actual time=0.021..4.816 rows=1,097 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 2,798
24. 593.168 593.168 ↑ 1.0 1 74,146

Index Scan using m_person_id_idx on m_person p_1 (cost=0.42..0.57 rows=1 width=24) (actual time=0.008..0.008 rows=1 loops=74,146)

  • Index Cond: (id = t_3.f_child)
  • Filter: (f_uptodate AND (NOT deleted) AND (f_link2reestr IS NOT NULL))
25. 0.026 0.618 ↓ 24.0 24 1

Hash (cost=5.54..5.54 rows=1 width=5) (actual time=0.618..0.618 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
26. 0.044 0.592 ↓ 24.0 24 1

HashAggregate (cost=5.53..5.54 rows=1 width=5) (actual time=0.578..0.592 rows=24 loops=1)

  • Group Key: t_2.catalog
27. 0.040 0.548 ↓ 24.0 24 1

Nested Loop (cost=0.00..5.53 rows=1 width=5) (actual time=0.154..0.548 rows=24 loops=1)

  • Join Filter: (t_2.roleid = t1_1.roleid)
28. 0.459 0.459 ↑ 1.0 1 1

Seq Scan on userroles t1_1 (cost=0.00..1.38 rows=1 width=18) (actual time=0.125..0.459 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
  • Rows Removed by Filter: 18
29. 0.049 0.049 ↓ 4.0 24 1

Seq Scan on urprivs t_2 (cost=0.00..4.08 rows=6 width=10) (actual time=0.023..0.049 rows=24 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 144
30. 501.732 501.732 ↑ 13.0 1 71,676

Index Scan using m_years_end_idx on m_years t_7 (cost=0.14..0.90 rows=13 width=8) (actual time=0.004..0.007 rows=1 loops=71,676)

  • Index Cond: (t_4.f_enroll_date <= "end")
  • Filter: (t_4.f_enroll_date >= begin)
  • Rows Removed by Filter: 12
31. 194.112 36,569.438 ↓ 5.2 143,592 1

Group (cost=286,352.15..286,558.83 rows=27,557 width=16) (actual time=36,261.909..36,569.438 rows=143,592 loops=1)

  • Group Key: t_11.f_link2reestr, p_2.f_link2reestr
32. 419.088 36,375.326 ↓ 5.3 146,304 1

Sort (cost=286,352.15..286,421.04 rows=27,557 width=16) (actual time=36,261.903..36,375.326 rows=146,304 loops=1)

  • Sort Key: t_11.f_link2reestr, p_2.f_link2reestr
  • Sort Method: quicksort Memory: 13,003kB
33. 6,612.875 35,956.238 ↓ 5.3 146,304 1

Nested Loop (cost=71,736.09..284,319.80 rows=27,557 width=16) (actual time=7,033.572..35,956.238 rows=146,304 loops=1)

  • Join Filter: (((now() >= t_12.begin) AND (now() <= t_12."end") AND (f_get_learning_status_by_date(t_10.f_enroll_date, t_10.f_exclude_date, (now())::date) IS TRUE) AND (now() >= t_13.begin) AND (now() <= t_13."end")) OR (((now() < t_12.begin) OR (now() > t_12."end")) AND (t_10.f_enroll_date >= t_12.begin) AND (t_10.f_enroll_date < t_12."end")))
  • Rows Removed by Join Filter: 634,706
34. 1,191.891 22,877.897 ↓ 46.0 923,638 1

Nested Loop (cost=71,735.94..187,956.97 rows=20,065 width=32) (actual time=2,672.173..22,877.897 rows=923,638 loops=1)

35. 0.041 0.041 ↑ 1.0 1 1

Seq Scan on m_years t_12 (cost=0.00..4.71 rows=1 width=8) (actual time=0.028..0.041 rows=1 loops=1)

  • Filter: ((id = 6) AND (((now() >= begin) AND (now() <= "end")) OR (now() < begin) OR (now() > "end")))
  • Rows Removed by Filter: 113
36. 3,040.649 21,685.965 ↓ 46.0 923,638 1

Nested Loop (cost=71,735.94..187,751.62 rows=20,065 width=24) (actual time=2,672.137..21,685.965 rows=923,638 loops=1)

37. 2,545.353 12,254.230 ↓ 13.3 1,065,181 1

Hash Join (cost=71,735.52..144,294.97 rows=80,262 width=24) (actual time=2,672.057..12,254.230 rows=1,065,181 loops=1)

  • Hash Cond: (t_9.f_org = t_11.id)
38. 5,178.515 9,703.730 ↓ 7.4 2,361,756 1

Hash Join (cost=70,909.39..141,462.61 rows=320,964 width=24) (actual time=2,666.011..9,703.730 rows=2,361,756 loops=1)

  • Hash Cond: (t_9.f_child = p_2.id)
39. 1,859.733 1,859.733 ↑ 1.0 2,580,624 1

Seq Scan on m_mainchildeducation2child t_9 (cost=0.00..57,666.24 rows=2,580,624 width=24) (actual time=0.012..1,859.733 rows=2,580,624 loops=1)

40. 626.126 2,665.482 ↓ 7.9 639,128 1

Hash (cost=69,894.97..69,894.97 rows=81,154 width=16) (actual time=2,665.482..2,665.482 rows=639,128 loops=1)

  • Buckets: 1,048,576 (originally 131072) Batches: 1 (originally 1) Memory Usage: 38,152kB
41. 1,169.962 2,039.356 ↓ 7.9 639,128 1

Hash Join (cost=5.56..69,894.97 rows=81,154 width=16) (actual time=0.656..2,039.356 rows=639,128 loops=1)

  • Hash Cond: ((p_2.cid)::numeric = t_8.catalog)
42. 868.775 868.775 ↓ 3.9 639,128 1

Seq Scan on m_person p_2 (cost=0.00..69,075.96 rows=162,308 width=24) (actual time=0.014..868.775 rows=639,128 loops=1)

  • Filter: (f_uptodate AND (NOT deleted) AND (f_link2reestr IS NOT NULL))
  • Rows Removed by Filter: 12,565
43. 0.024 0.619 ↓ 24.0 24 1

Hash (cost=5.54..5.54 rows=1 width=5) (actual time=0.619..0.619 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
44. 0.046 0.595 ↓ 24.0 24 1

HashAggregate (cost=5.53..5.54 rows=1 width=5) (actual time=0.580..0.595 rows=24 loops=1)

  • Group Key: t_8.catalog
45. 0.057 0.549 ↓ 24.0 24 1

Nested Loop (cost=0.00..5.53 rows=1 width=5) (actual time=0.139..0.549 rows=24 loops=1)

  • Join Filter: (t_8.roleid = t1_2.roleid)
46. 0.443 0.443 ↑ 1.0 1 1

Seq Scan on userroles t1_2 (cost=0.00..1.38 rows=1 width=18) (actual time=0.111..0.443 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
  • Rows Removed by Filter: 18
47. 0.049 0.049 ↓ 4.0 24 1

Seq Scan on urprivs t_8 (cost=0.00..4.08 rows=6 width=10) (actual time=0.022..0.049 rows=24 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 144
48. 0.864 5.147 ↓ 1.1 1,097 1

Hash (cost=813.95..813.95 rows=974 width=16) (actual time=5.147..5.147 rows=1,097 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 68kB
49. 4.283 4.283 ↓ 1.1 1,097 1

Seq Scan on m_organization t_11 (cost=0.00..813.95 rows=974 width=16) (actual time=0.011..4.283 rows=1,097 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 2,798
50. 6,391.086 6,391.086 ↑ 1.0 1 1,065,181

Index Scan using m_mainchildeducation_id_idx on m_mainchildeducation t_10 (cost=0.43..0.53 rows=1 width=12) (actual time=0.005..0.006 rows=1 loops=1,065,181)

  • Index Cond: (id = t_9.f_edu_oo)
  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 0
51. 6,465.466 6,465.466 ↑ 13.0 1 923,638

Index Scan using m_years_end_idx on m_years t_13 (cost=0.14..0.90 rows=13 width=8) (actual time=0.003..0.007 rows=1 loops=923,638)

  • Index Cond: (t_10.f_enroll_date <= "end")
  • Filter: (t_10.f_enroll_date >= begin)
  • Rows Removed by Filter: 13
52. 19.381 13,554.385 ↓ 1.9 13,465 1

Group (cost=106,054.98..106,107.03 rows=6,940 width=16) (actual time=13,524.174..13,554.385 rows=13,465 loops=1)

  • Group Key: t_17.f_link2reestr, p_3.f_link2reestr
53. 36.543 13,535.004 ↓ 2.2 15,417 1

Sort (cost=106,054.98..106,072.33 rows=6,940 width=16) (actual time=13,524.170..13,535.004 rows=15,417 loops=1)

  • Sort Key: t_17.f_link2reestr, p_3.f_link2reestr
  • Sort Method: quicksort Memory: 1,107kB
54. 2,691.343 13,498.461 ↓ 2.2 15,417 1

Nested Loop (cost=27,166.67..105,612.18 rows=6,940 width=16) (actual time=2,188.933..13,498.461 rows=15,417 loops=1)

  • Join Filter: (((now() >= t_18.begin) AND (now() <= t_18."end") AND (f_get_learning_status_by_date(t_16.f_enroll_date, t_16.f_exclude_date, (now())::date) IS TRUE) AND (now() >= t_19.begin) AND (now() <= t_19."end")) OR (((now() < t_18.begin) OR (now() > t_18."end")) AND (t_16.f_enroll_date >= t_18.begin) AND (t_16.f_enroll_date < t_18."end")))
  • Rows Removed by Join Filter: 259,847
55. 484.786 8,579.570 ↓ 73.5 371,258 1

Nested Loop (cost=27,166.52..81,344.69 rows=5,053 width=32) (actual time=989.005..8,579.570 rows=371,258 loops=1)

56. 0.053 0.053 ↑ 1.0 1 1

Seq Scan on m_years t_18 (cost=0.00..4.71 rows=1 width=8) (actual time=0.041..0.053 rows=1 loops=1)

  • Filter: ((id = 6) AND (((now() >= begin) AND (now() <= "end")) OR (now() < begin) OR (now() > "end")))
  • Rows Removed by Filter: 113
57. 897.271 8,094.731 ↓ 73.5 371,258 1

Hash Join (cost=27,166.52..81,289.45 rows=5,053 width=24) (actual time=988.956..8,094.731 rows=371,258 loops=1)

  • Hash Cond: ((p_3.cid)::numeric = t_14.catalog)
58. 1,152.729 7,196.858 ↓ 36.7 371,258 1

Nested Loop (cost=27,160.97..81,233.25 rows=10,106 width=32) (actual time=988.327..7,196.858 rows=371,258 loops=1)

59. 678.815 3,352.979 ↓ 9.5 384,450 1

Hash Join (cost=27,160.54..46,759.30 rows=40,627 width=24) (actual time=988.259..3,352.979 rows=384,450 loops=1)

  • Hash Cond: (t_15.f_org = t_17.id)
60. 1,193.645 2,669.103 ↓ 3.0 492,917 1

Hash Join (cost=26,334.42..44,917.66 rows=162,465 width=24) (actual time=983.185..2,669.103 rows=492,917 loops=1)

  • Hash Cond: (t_15.f_add_edu = t_16.id)
61. 493.280 493.280 ↑ 1.0 649,861 1

Seq Scan on m_additionaledu2child t_15 (cost=0.00..14,521.61 rows=649,861 width=24) (actual time=0.023..493.280 rows=649,861 loops=1)

62. 352.630 982.178 ↓ 2.9 374,409 1

Hash (cost=24,694.32..24,694.32 rows=131,208 width=12) (actual time=982.178..982.178 rows=374,409 loops=1)

  • Buckets: 524,288 (originally 262144) Batches: 1 (originally 1) Memory Usage: 19,835kB
63. 629.548 629.548 ↓ 2.9 374,409 1

Seq Scan on m_additionaledu t_16 (cost=0.00..24,694.32 rows=131,208 width=12) (actual time=0.076..629.548 rows=374,409 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 150,423
64. 0.861 5.061 ↓ 1.1 1,097 1

Hash (cost=813.95..813.95 rows=974 width=16) (actual time=5.061..5.061 rows=1,097 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 68kB
65. 4.200 4.200 ↓ 1.1 1,097 1

Seq Scan on m_organization t_17 (cost=0.00..813.95 rows=974 width=16) (actual time=0.011..4.200 rows=1,097 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 2,798
66. 2,691.150 2,691.150 ↑ 1.0 1 384,450

Index Scan using m_person_id_idx on m_person p_3 (cost=0.42..0.84 rows=1 width=24) (actual time=0.006..0.007 rows=1 loops=384,450)

  • Index Cond: (id = t_15.f_child)
  • Filter: (f_uptodate AND (NOT deleted) AND (f_link2reestr IS NOT NULL))
  • Rows Removed by Filter: 0
67. 0.025 0.602 ↓ 24.0 24 1

Hash (cost=5.54..5.54 rows=1 width=5) (actual time=0.602..0.602 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
68. 0.047 0.577 ↓ 24.0 24 1

HashAggregate (cost=5.53..5.54 rows=1 width=5) (actual time=0.563..0.577 rows=24 loops=1)

  • Group Key: t_14.catalog
69. 0.037 0.530 ↓ 24.0 24 1

Nested Loop (cost=0.00..5.53 rows=1 width=5) (actual time=0.145..0.530 rows=24 loops=1)

  • Join Filter: (t_14.roleid = t1_3.roleid)
70. 0.445 0.445 ↑ 1.0 1 1

Seq Scan on userroles t1_3 (cost=0.00..1.38 rows=1 width=18) (actual time=0.120..0.445 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
  • Rows Removed by Filter: 18
71. 0.048 0.048 ↓ 4.0 24 1

Seq Scan on urprivs t_14 (cost=0.00..4.08 rows=6 width=10) (actual time=0.022..0.048 rows=24 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 144
72. 2,227.548 2,227.548 ↑ 13.0 1 371,258

Index Scan using m_years_end_idx on m_years t_19 (cost=0.14..0.90 rows=13 width=8) (actual time=0.004..0.006 rows=1 loops=371,258)

  • Index Cond: (t_16.f_enroll_date <= "end")
  • Filter: (t_16.f_enroll_date >= begin)
  • Rows Removed by Filter: 12
73. 77.395 2,604.762 ↓ 2.7 21,818 1

Nested Loop (cost=13,144.26..43,656.05 rows=8,157 width=16) (actual time=700.770..2,604.762 rows=21,818 loops=1)

74. 63.778 2,376.431 ↓ 39.1 25,156 1

Hash Join (cost=13,144.12..42,990.96 rows=644 width=20) (actual time=700.753..2,376.431 rows=25,156 loops=1)

  • Hash Cond: ((p_4.cid)::numeric = t_20.catalog)
75. 88.043 2,311.978 ↓ 19.5 25,156 1

Nested Loop (cost=13,138.57..42,978.95 rows=1,287 width=28) (actual time=700.041..2,311.978 rows=25,156 loops=1)

76. 472.318 2,038.372 ↓ 5.1 26,509 1

Nested Loop (cost=13,138.14..38,055.55 rows=5,175 width=20) (actual time=700.004..2,038.372 rows=26,509 loops=1)

  • Join Filter: (((now() >= t_24.begin) AND (now() <= t_24."end") AND (f_get_learning_status_by_date(t_22.f_enroll_date, t_22.f_exclude_date, (now())::date) IS TRUE)) OR (((now() < t_24.begin) OR (now() > t_24."end")) AND (t_22.f_enroll_date < t_24."end") AND ((t_22.f_exclude_date IS NULL) OR (t_22.f_exclude_date > t_24.begin))))
  • Rows Removed by Join Filter: 57,995
77. 0.045 0.045 ↑ 1.0 1 1

Seq Scan on m_years t_24 (cost=0.00..4.71 rows=1 width=8) (actual time=0.033..0.045 rows=1 loops=1)

  • Filter: ((id = 6) AND (((now() >= begin) AND (now() <= "end")) OR (now() < begin) OR (now() > "end")))
  • Rows Removed by Filter: 113
78. 277.634 1,566.009 ↓ 2.6 84,504 1

Hash Join (cost=13,138.14..28,697.76 rows=32,252 width=24) (actual time=699.897..1,566.009 rows=84,504 loops=1)

  • Hash Cond: (t_21.f_org = t_23.id)
79. 711.098 1,283.363 ↓ 2.4 307,198 1

Hash Join (cost=12,312.02..27,065.46 rows=128,976 width=24) (actual time=480.733..1,283.363 rows=307,198 loops=1)

  • Hash Cond: (t_21.f_edu_spo = t_22.id)
80. 355.808 355.808 ↑ 1.0 515,904 1

Seq Scan on m_middleprofeducation2child t_21 (cost=0.00..11,529.04 rows=515,904 width=24) (actual time=0.019..355.808 rows=515,904 loops=1)

81. 80.774 216.457 ↓ 1.7 86,281 1

Hash (cost=11,693.44..11,693.44 rows=49,486 width=12) (actual time=216.457..216.457 rows=86,281 loops=1)

  • Buckets: 131,072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 4,631kB
82. 135.683 135.683 ↓ 1.7 86,281 1

Seq Scan on m_middleprofeducation t_22 (cost=0.00..11,693.44 rows=49,486 width=12) (actual time=0.071..135.683 rows=86,281 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 111,663
83. 0.865 5.012 ↓ 1.1 1,097 1

Hash (cost=813.95..813.95 rows=974 width=16) (actual time=5.012..5.012 rows=1,097 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 68kB
84. 4.147 4.147 ↓ 1.1 1,097 1

Seq Scan on m_organization t_23 (cost=0.00..813.95 rows=974 width=16) (actual time=0.008..4.147 rows=1,097 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 2,798
85. 185.563 185.563 ↑ 1.0 1 26,509

Index Scan using m_person_id_idx on m_person p_4 (cost=0.42..0.94 rows=1 width=24) (actual time=0.006..0.007 rows=1 loops=26,509)

  • Index Cond: (id = t_21.f_child)
  • Filter: (f_uptodate AND (NOT deleted) AND (f_link2reestr IS NOT NULL))
86. 0.024 0.675 ↓ 24.0 24 1

Hash (cost=5.54..5.54 rows=1 width=5) (actual time=0.675..0.675 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
87. 0.050 0.651 ↓ 24.0 24 1

HashAggregate (cost=5.53..5.54 rows=1 width=5) (actual time=0.635..0.651 rows=24 loops=1)

  • Group Key: t_20.catalog
88. 0.042 0.601 ↓ 24.0 24 1

Nested Loop (cost=0.00..5.53 rows=1 width=5) (actual time=0.212..0.601 rows=24 loops=1)

  • Join Filter: (t_20.roleid = t1_4.roleid)
89. 0.509 0.509 ↑ 1.0 1 1

Seq Scan on userroles t1_4 (cost=0.00..1.38 rows=1 width=18) (actual time=0.182..0.509 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
  • Rows Removed by Filter: 18
90. 0.050 0.050 ↓ 4.0 24 1

Seq Scan on urprivs t_20 (cost=0.00..4.08 rows=6 width=10) (actual time=0.025..0.050 rows=24 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 144
91. 150.936 150.936 ↑ 13.0 1 25,156

Index Scan using m_years_end_idx on m_years t_25 (cost=0.14..0.90 rows=13 width=8) (actual time=0.004..0.006 rows=1 loops=25,156)

  • Index Cond: (t_22.f_enroll_date <= "end")
  • Filter: (t_22.f_enroll_date >= begin)
  • Rows Removed by Filter: 11
92. 0.002 0.054 ↓ 0.0 0 1

Nested Loop (cost=1.00..41.07 rows=13 width=16) (actual time=0.054..0.054 rows=0 loops=1)

  • Join Filter: ((t_28.f_enroll_date >= t_31.begin) AND (t_28.f_enroll_date <= t_31."end"))
93. 0.001 0.052 ↓ 0.0 0 1

Nested Loop (cost=1.00..37.22 rows=1 width=20) (actual time=0.052..0.052 rows=0 loops=1)

94. 0.002 0.051 ↓ 0.0 0 1

Nested Loop Semi Join (cost=0.72..32.85 rows=1 width=20) (actual time=0.051..0.051 rows=0 loops=1)

95. 0.002 0.049 ↓ 0.0 0 1

Nested Loop (cost=0.57..29.87 rows=1 width=28) (actual time=0.049..0.049 rows=0 loops=1)

96. 0.001 0.047 ↓ 0.0 0 1

Nested Loop (cost=0.14..21.56 rows=1 width=20) (actual time=0.047..0.047 rows=0 loops=1)

97. 0.004 0.046 ↓ 0.0 0 1

Nested Loop (cost=0.00..15.38 rows=1 width=8) (actual time=0.046..0.046 rows=0 loops=1)

  • Join Filter: (((now() >= t_30.begin) AND (now() <= t_30."end") AND (f_get_learning_status_by_date(t_28.f_enroll_date, t_28.f_exclude_date, (now())::date) IS TRUE)) OR (((now() < t_30.begin) OR (now() > t_30."end")) AND (t_28.f_enroll_date < t_30."end") AND ((t_28.f_exclude_date IS NULL) OR (t_28.f_exclude_date > t_30.begin))))
98. 0.031 0.031 ↑ 1.0 1 1

Seq Scan on m_years t_30 (cost=0.00..4.71 rows=1 width=8) (actual time=0.020..0.031 rows=1 loops=1)

  • Filter: ((id = 6) AND (((now() >= begin) AND (now() <= "end")) OR (now() < begin) OR (now() > "end")))
  • Rows Removed by Filter: 113
99. 0.011 0.011 ↓ 0.0 0 1

Seq Scan on m_professionaledu t_28 (cost=0.00..10.10 rows=2 width=12) (actual time=0.011..0.011 rows=0 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
100. 0.000 0.000 ↓ 0.0 0

Index Scan using m_professionaledu2child_f_edu_prof_idx on m_professionaledu2child t_27 (cost=0.14..6.16 rows=1 width=24) (never executed)

  • Index Cond: (f_edu_prof = t_28.id)
101. 0.000 0.000 ↓ 0.0 0

Index Scan using m_person_id_idx on m_person p_5 (cost=0.42..8.30 rows=1 width=24) (never executed)

  • Index Cond: (id = t_27.f_child)
  • Filter: (f_uptodate AND (NOT deleted) AND (f_link2reestr IS NOT NULL))
102. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.15..1.56 rows=1 width=5) (never executed)

  • Join Filter: (t_26.roleid = t1_5.roleid)
103. 0.000 0.000 ↓ 0.0 0

Index Scan using i_urprivs_cat on urprivs t_26 (cost=0.15..0.17 rows=1 width=10) (never executed)

  • Index Cond: ((catalog = (p_5.cid)::numeric) AND (catalog IS NOT NULL))
  • Filter: ((unitcode)::text = 'orgreestr'::text)
104. 0.000 0.000 ↓ 0.0 0

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

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

Index Scan using m_organization_id_idx on m_organization t_29 (cost=0.28..4.35 rows=1 width=16) (never executed)

  • Index Cond: (id = t_27.f_org)
  • Filter: (f_uptodate AND (NOT deleted))
106. 0.000 0.000 ↓ 0.0 0

Seq Scan on m_years t_31 (cost=0.00..2.14 rows=114 width=8) (never executed)

107. 349.620 762.929 ↓ 4.0 424,645 1

Hash (cost=14,406.84..14,406.84 rows=107,421 width=4) (actual time=762.929..762.929 rows=424,645 loops=1)

  • Buckets: 524,288 (originally 131072) Batches: 1 (originally 1) Memory Usage: 19,025kB
108. 413.309 413.309 ↓ 4.0 424,645 1

Seq Scan on m_childreestr cr (cost=0.00..14,406.84 rows=107,421 width=4) (actual time=0.023..413.309 rows=424,645 loops=1)

  • Filter: ((NOT deleted) AND f_uptodate)
  • Rows Removed by Filter: 208
109. 1,146.805 1,146.805 ↑ 1.0 1 229,361

Index Scan using m_childreestr_id_idx on m_childreestr t (cost=0.42..2.78 rows=1 width=5,248) (actual time=0.004..0.005 rows=1 loops=229,361)

  • Index Cond: (id = cr.id)
110. 1,376.166 1,376.166 ↑ 1.0 1 229,361

Index Scan using m_person_id_idx on m_person p (cost=0.42..1.04 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=229,361)

  • Index Cond: (id = t.f_max_priority)
111. 0.038 0.717 ↓ 24.0 24 1

Hash (cost=5.54..5.54 rows=1 width=5) (actual time=0.717..0.717 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
112. 0.063 0.679 ↓ 24.0 24 1

HashAggregate (cost=5.53..5.54 rows=1 width=5) (actual time=0.662..0.679 rows=24 loops=1)

  • Group Key: t_1.catalog
113. 0.041 0.616 ↓ 24.0 24 1

Nested Loop (cost=0.00..5.53 rows=1 width=5) (actual time=0.185..0.616 rows=24 loops=1)

  • Join Filter: (t_1.roleid = t1.roleid)
114. 0.507 0.507 ↑ 1.0 1 1

Seq Scan on userroles t1 (cost=0.00..1.38 rows=1 width=18) (actual time=0.146..0.507 rows=1 loops=1)

  • Filter: (sysuser = (core.f_sys_get_config('sysuser'::text))::numeric)
  • Rows Removed by Filter: 18
115. 0.068 0.068 ↓ 4.0 24 1

Seq Scan on urprivs t_1 (cost=0.00..4.08 rows=6 width=10) (actual time=0.034..0.068 rows=24 loops=1)

  • Filter: ((catalog IS NOT NULL) AND ((unitcode)::text = 'orgreestr'::text))
  • Rows Removed by Filter: 144
Planning time : 20.573 ms
Execution time : 74,314.506 ms