explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 46VP

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=121,726,695.44..121,726,695.50 rows=25 width=23) (actual rows= loops=)

  • Sort Key: cvp.codigo_script
2. 0.000 0.000 ↓ 0.0

HashAggregate (cost=121,726,694.49..121,726,694.86 rows=25 width=23) (actual rows= loops=)

  • Group Key: cvp.codigo_script, cvp.classe
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=3,146.98..5,974.54 rows=49,796 width=23) (actual rows= loops=)

  • Hash Cond: (pei.pesagem = pe.id)
4. 0.000 0.000 ↓ 0.0

Seq Scan on pesagem_eixo pei (cost=0.00..1,985.25 rows=91,825 width=4) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=2,718.76..2,718.76 rows=34,258 width=23) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.56..2,718.76 rows=34,258 width=23) (actual rows= loops=)

  • Hash Cond: (pe.classificacao_veiculo_pesagem = cvp.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on pesagem pe (cost=0.00..2,136.72 rows=63,172 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=2.25..2.25 rows=25 width=15) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on classificacao_veiculo_pesagem cvp (cost=0.00..2.25 rows=25 width=15) (actual rows= loops=)

10.          

SubPlan (forHashAggregate)

11. 0.000 0.000 ↓ 0.0

Result (cost=0.00..2,444.38 rows=1 width=4) (actual rows= loops=)

  • One-Time Filter: (pe.classificacao_veiculo_pesagem = cvp.id)
12. 0.000 0.000 ↓ 0.0

Seq Scan on pesagem_eixo (cost=0.00..2,444.38 rows=1 width=4) (actual rows= loops=)

  • Filter: ((pesagem = pe.id) AND (numero = 1))