explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YFYk : Report 185

Settings
# exclusive inclusive rows x rows loops node
1. 13,790.610 114,854.445 ↓ 1.0 3,468,529 1

Sort (cost=61,458,120.23..61,466,787.04 rows=3,466,725 width=69) (actual time=112,058.525..114,854.445 rows=3,468,529 loops=1)

  • Sort Key: base.id
  • Sort Method: external merge Disk: 390,968kB
2. 18,897.564 101,063.835 ↓ 1.0 3,468,529 1

Hash Left Join (cost=17,353.96..60,979,979.77 rows=3,466,725 width=69) (actual time=526.448..101,063.835 rows=3,468,529 loops=1)

  • Hash Cond: (base.userid = auser.id)
3. 1,864.248 1,864.248 ↓ 1.0 3,468,529 1

Seq Scan on mdl_course_completions base (cost=0.00..112,935.25 rows=3,466,725 width=26) (actual time=0.006..1,864.248 rows=3,468,529 loops=1)

4. 117.749 525.856 ↓ 1.0 204,026 1

Hash (cost=14,803.98..14,803.98 rows=203,998 width=51) (actual time=525.856..525.856 rows=204,026 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 17,946kB
5. 408.107 408.107 ↓ 1.0 204,026 1

Seq Scan on mdl_user auser (cost=0.00..14,803.98 rows=203,998 width=51) (actual time=0.041..408.107 rows=204,026 loops=1)

6.          

SubPlan (for Hash Left Join)

7. 13,874.116 45,090.877 ↑ 1.0 1 3,468,529

Aggregate (cost=8.75..8.76 rows=1 width=25) (actual time=0.013..0.013 rows=1 loops=3,468,529)

8. 4,767.655 31,216.761 ↑ 1.0 1 3,468,529

Nested Loop (cost=0.70..8.75 rows=1 width=25) (actual time=0.009..0.009 rows=1 loops=3,468,529)

9. 17,342.645 17,342.645 ↑ 1.0 1 3,468,529

Index Scan using mdl_jobassi_usesor_uix on mdl_job_assignment ja (cost=0.42..4.44 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=3,468,529)

  • Index Cond: (userid = auser.id)
10. 9,106.461 9,106.461 ↑ 1.0 1 3,035,487

Index Scan using mdl_org_id_pk on mdl_org o (cost=0.28..4.30 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=3,035,487)

  • Index Cond: (id = ja.organisationid)
  • Filter: (fullname IS NOT NULL)
11. 10,405.587 34,685.290 ↑ 1.0 1 3,468,529

Aggregate (cost=8.75..8.76 rows=1 width=33) (actual time=0.010..0.010 rows=1 loops=3,468,529)

12. 4,767.655 24,279.703 ↑ 1.0 1 3,468,529

Nested Loop (cost=0.70..8.74 rows=1 width=33) (actual time=0.006..0.007 rows=1 loops=3,468,529)

13. 10,405.587 10,405.587 ↑ 1.0 1 3,468,529

Index Scan using mdl_jobassi_usesor_uix on mdl_job_assignment ja_1 (cost=0.42..4.44 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=3,468,529)

  • Index Cond: (userid = auser.id)
14. 9,106.461 9,106.461 ↑ 1.0 1 3,035,487

Index Scan using mdl_pos_id_pk on mdl_pos p (cost=0.28..4.30 rows=1 width=41) (actual time=0.002..0.003 rows=1 loops=3,035,487)

  • Index Cond: (id = ja_1.positionid)
  • Filter: (fullname IS NOT NULL)
Total runtime : 115,124.358 ms