explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AbYa

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.027 0.085 ↑ 420.0 1 1

HashAggregate (cost=66.59..72.89 rows=420 width=154) (actual time=0.085..0.085 rows=1 loops=1)

  • Group Key: depto.cod_depto
  • Filter: (avg(emp.salario) = $0)
  • Rows Removed by Filter: 2
2.          

Initplan (for HashAggregate)

3. 0.003 0.020 ↑ 1.0 1 1

Aggregate (cost=21.30..21.31 rows=1 width=32) (actual time=0.020..0.020 rows=1 loops=1)

4. 0.010 0.017 ↑ 66.7 3 1

HashAggregate (cost=16.30..18.80 rows=200 width=36) (actual time=0.015..0.017 rows=3 loops=1)

  • Group Key: emp_1.cod_depto
5. 0.007 0.007 ↑ 46.7 9 1

Seq Scan on empregado emp_1 (cost=0.00..14.20 rows=420 width=36) (actual time=0.006..0.007 rows=9 loops=1)

6. 0.016 0.038 ↑ 46.7 9 1

Hash Join (cost=22.15..42.13 rows=420 width=154) (actual time=0.033..0.038 rows=9 loops=1)

  • Hash Cond: (emp.cod_depto = depto.cod_depto)
7. 0.013 0.013 ↑ 46.7 9 1

Seq Scan on empregado emp (cost=0.00..14.20 rows=420 width=36) (actual time=0.012..0.013 rows=9 loops=1)

8. 0.002 0.009 ↑ 180.0 3 1

Hash (cost=15.40..15.40 rows=540 width=122) (actual time=0.009..0.009 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.007 0.007 ↑ 180.0 3 1

Seq Scan on departamento depto (cost=0.00..15.40 rows=540 width=122) (actual time=0.006..0.007 rows=3 loops=1)

Planning time : 0.235 ms
Execution time : 0.163 ms