explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9ybL

Settings
# exclusive inclusive rows x rows loops node
1. 415.622 7,874.702 ↓ 1.0 5,337 1

Hash Join (cost=6,287.47..9,046.22 rows=5,106 width=4) (actual time=975.205..7,874.702 rows=5,337 loops=1)

  • Hash Cond: (t.curso = c.codigo)
2. 398.454 7,452.589 ↓ 1.0 5,337 1

Hash Join (cost=6,284.01..9,028.49 rows=5,106 width=8) (actual time=968.492..7,452.589 rows=5,337 loops=1)

  • Hash Cond: (ht.turma = t.codigo)
3. 412.187 6,749.371 ↓ 1.0 5,337 1

Hash Join (cost=6,112.70..8,843.77 rows=5,106 width=8) (actual time=663.454..6,749.371 rows=5,337 loops=1)

  • Hash Cond: (htd.horarioturma = ht.codigo)
4. 3,137.317 6,286.080 ↓ 1.0 5,337 1

Hash Join (cost=6,099.79..8,817.31 rows=5,106 width=4) (actual time=611.846..6,286.080 rows=5,337 loops=1)

  • Hash Cond: (htd.codigo = htdi.horarioturmadia)
5. 2,609.748 2,609.748 ↑ 1.0 74,371 1

Seq Scan on horarioturmadia htd (cost=0.00..2,015.71 rows=74,371 width=8) (actual time=0.193..2,609.748 rows=74,371 loops=1)

6. 248.574 539.015 ↓ 1.0 5,337 1

Hash (cost=6,035.97..6,035.97 rows=5,106 width=4) (actual time=538.992..539.015 rows=5,337 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 252kB
7. 287.601 290.441 ↓ 1.0 5,337 1

Bitmap Heap Scan on horarioturmadiaitem htdi (cost=183.99..6,035.97 rows=5,106 width=4) (actual time=3.297..290.441 rows=5,337 loops=1)

  • Recheck Cond: (professor = 119425)
  • Heap Blocks: exact=777
8. 2.840 2.840 ↓ 1.0 5,337 1

Bitmap Index Scan on idx_horturdiaitem_professor (cost=0.00..182.72 rows=5,106 width=0) (actual time=2.817..2.840 rows=5,337 loops=1)

  • Index Cond: (professor = 119425)
9. 17.391 51.104 ↑ 1.0 396 1

Hash (cost=7.96..7.96 rows=396 width=8) (actual time=51.082..51.104 rows=396 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
10. 33.713 33.713 ↑ 1.0 396 1

Seq Scan on horarioturma ht (cost=0.00..7.96 rows=396 width=8) (actual time=0.192..33.713 rows=396 loops=1)

11. 152.330 304.764 ↑ 1.0 4,147 1

Hash (cost=119.47..119.47 rows=4,147 width=8) (actual time=304.741..304.764 rows=4,147 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 226kB
12. 152.434 152.434 ↑ 1.0 4,147 1

Seq Scan on turma t (cost=0.00..119.47 rows=4,147 width=8) (actual time=0.193..152.434 rows=4,147 loops=1)

13. 3.033 6.491 ↓ 1.0 67 1

Hash (cost=2.65..2.65 rows=65 width=4) (actual time=6.468..6.491 rows=67 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
14. 3.458 3.458 ↓ 1.0 67 1

Seq Scan on curso c (cost=0.00..2.65 rows=65 width=4) (actual time=0.172..3.458 rows=67 loops=1)

Planning time : 17.814 ms
Execution time : 8,116.111 ms