explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cYth

Settings
# exclusive inclusive rows x rows loops node
1. 0.509 214,360.068 ↑ 1.0 300 1

Sort (cost=1,623,125.39..1,623,126.14 rows=300 width=143) (actual time=214,360.029..214,360.068 rows=300 loops=1)

  • Sort Key: (min(base.id))
  • Sort Method: quicksort Memory: 214kB
2. 12,388.114 214,359.559 ↑ 1.0 300 1

GroupAggregate (cost=414,609.46..1,623,113.04 rows=300 width=143) (actual time=159,283.070..214,359.559 rows=300 loops=1)

3. 200,962.214 201,971.445 ↓ 1.1 2,567,624 1

Sort (cost=414,609.46..420,336.24 rows=2,290,712 width=143) (actual time=159,278.818..201,971.445 rows=2,567,624 loops=1)

  • Sort Key: base.type, base.name, base.updatedtime, base.advisory, base.starttime, base.gracetime, base.acktime, base.id, base.deleted
  • Sort Method: external merge Disk: 384896kB
4. 940.948 1,009.231 ↓ 1.1 2,567,624 1

Hash Right Join (cost=420.11..31,691.92 rows=2,290,712 width=143) (actual time=4.416..1,009.231 rows=2,567,624 loops=1)

  • Hash Cond: (completion.itemid = base.id)
5. 63.885 63.885 ↑ 1.0 252,745 1

Seq Scan on mdl_local_competency_completion completion (cost=0.00..4,889.45 rows=252,745 width=19) (actual time=0.006..63.885 rows=252,745 loops=1)

6. 0.954 4.398 ↓ 1.0 2,726 1

Hash (cost=386.12..386.12 rows=2,719 width=132) (actual time=4.398..4.398 rows=2,726 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 445kB
7. 0.694 3.444 ↓ 1.0 2,726 1

Hash Left Join (cost=266.16..386.12 rows=2,719 width=132) (actual time=1.558..3.444 rows=2,726 loops=1)

  • Hash Cond: (audience_assign.cohortid = audience.id)
8. 0.894 1.959 ↓ 1.0 2,726 1

Hash Right Join (cost=134.75..217.33 rows=2,719 width=112) (actual time=0.757..1.959 rows=2,726 loops=1)

  • Hash Cond: (audience_assign.itemid = base.id)
9. 0.327 0.327 ↑ 1.0 2,719 1

Seq Scan on mdl_local_competency_cohort_assign audience_assign (cost=0.00..45.19 rows=2,719 width=16) (actual time=0.009..0.327 rows=2,719 loops=1)

10. 0.115 0.738 ↑ 1.0 300 1

Hash (cost=131.00..131.00 rows=300 width=104) (actual time=0.738..0.738 rows=300 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 42kB
11. 0.623 0.623 ↑ 1.0 300 1

Seq Scan on mdl_local_competency_item base (cost=0.00..131.00 rows=300 width=104) (actual time=0.381..0.623 rows=300 loops=1)

12. 0.207 0.791 ↑ 1.0 996 1

Hash (cost=118.96..118.96 rows=996 width=36) (actual time=0.791..0.791 rows=996 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
13. 0.584 0.584 ↑ 1.0 996 1

Seq Scan on mdl_cohort audience (cost=0.00..118.96 rows=996 width=36) (actual time=0.283..0.584 rows=996 loops=1)