explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JcOb

Settings
# exclusive inclusive rows x rows loops node
1. 764.558 17,709.171 ↓ 1.2 146,304 1

Nested Loop (cost=319,979.28..503,402.83 rows=119,937 width=44) (actual time=6,986.761..17,709.171 rows=146,304 loops=1)

  • Join Filter: ((edu.f_enroll_date >= t.begin) AND (edu.f_enroll_date <= t."end"))
  • Rows Removed by Join Filter: 81516
2. 886.688 16,716.793 ↓ 2.1 227,820 1

Nested Loop (cost=319,979.28..484,509.50 rows=107,943 width=44) (actual time=5,001.922..16,716.793 rows=227,820 loops=1)

3. 515.188 10,789.160 ↓ 1.6 240,045 1

Hash Join (cost=319,978.86..396,455.02 rows=153,358 width=44) (actual time=4,987.727..10,789.160 rows=240,045 loops=1)

  • Hash Cond: (edu2cd.f_org = org.id)
4. 2,930.073 10,253.888 ↑ 1.6 343,078 1

Hash Join (cost=319,146.19..392,016.32 rows=552,655 width=44) (actual time=4,267.108..10,253.888 rows=343,078 loops=1)

  • Hash Cond: (edu2cd.f_edu_oo = edu.id)
5. 3,167.351 3,167.351 ↑ 1.0 2,580,624 1

Seq Scan on mainchildeducation2child edu2cd (cost=0.00..57,666.24 rows=2,580,624 width=24) (actual time=0.011..3,167.351 rows=2,580,624 loops=1)

6. 291.673 4,156.464 ↑ 1.4 228,834 1

Hash (cost=315,282.17..315,282.17 rows=309,122 width=28) (actual time=4,156.464..4,156.464 rows=228,834 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 18399kB
7. 3,643.049 3,864.791 ↑ 1.4 228,834 1

Bitmap Heap Scan on mainchildeducation edu (cost=17,246.53..315,282.17 rows=309,122 width=28) (actual time=236.474..3,864.791 rows=228,834 loops=1)

  • Filter: (f_uptodate AND (NOT deleted) AND (f_get_learning_status_by_date(f_enroll_date, f_exclude_date, (now())::date) IS TRUE))
  • Rows Removed by Filter: 702776
  • Heap Blocks: exact=51769
8. 221.742 221.742 ↓ 1.0 931,610 1

Bitmap Index Scan on mainchildeducation_f_uptodate_idx (cost=0.00..17,169.25 rows=929,176 width=0) (actual time=221.742..221.742 rows=931,610 loops=1)

  • Index Cond: (f_uptodate = true)
9. 1.188 20.084 ↓ 1.0 1,097 1

Hash (cost=819.10..819.10 rows=1,085 width=16) (actual time=20.084..20.084 rows=1,097 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 68kB
10. 18.896 18.896 ↓ 1.0 1,097 1

Seq Scan on organization org (cost=0.00..819.10 rows=1,085 width=16) (actual time=0.042..18.896 rows=1,097 loops=1)

  • Filter: (f_uptodate AND (NOT deleted))
  • Rows Removed by Filter: 2798
11. 5,040.945 5,040.945 ↑ 1.0 1 240,045

Index Scan using person_pkey on person (cost=0.42..0.56 rows=1 width=16) (actual time=0.020..0.021 rows=1 loops=240,045)

  • Index Cond: (id = edu2cd.f_child)
  • Filter: (f_uptodate AND (NOT deleted) AND (f_link2reestr IS NOT NULL))
  • Rows Removed by Filter: 0
12. 227.757 227.820 ↑ 10.0 1 227,820

Materialize (cost=0.00..3.33 rows=10 width=8) (actual time=0.001..0.001 rows=1 loops=227,820)

13. 0.063 0.063 ↑ 10.0 1 1

Seq Scan on m_years t (cost=0.00..3.28 rows=10 width=8) (actual time=0.023..0.063 rows=1 loops=1)

  • Filter: ((now() >= begin) AND (now() <= "end"))
  • Rows Removed by Filter: 113
Planning time : 2.985 ms
Execution time : 17,807.396 ms