explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LFbl

Settings
# exclusive inclusive rows x rows loops node
1. 98.744 4,580.457 ↑ 1.0 600,948 1

Unique (cost=142,761.47..147,283.95 rows=602,998 width=43) (actual time=4,278.759..4,580.457 rows=600,948 loops=1)

2. 3,288.087 4,481.713 ↑ 1.0 602,955 1

Sort (cost=142,761.47..144,268.96 rows=602,998 width=43) (actual time=4,278.758..4,481.713 rows=602,955 loops=1)

  • Sort Key: pc.contr_contrato, ((ac.acordo_numero)::integer) DESC
  • Sort Method: external merge Disk: 32784kB
3. 224.389 1,193.626 ↑ 1.0 602,955 1

Hash Join (cost=22,501.55..66,318.25 rows=602,998 width=43) (actual time=302.524..1,193.626 rows=602,955 loops=1)

  • Hash Cond: (ac.acordo_status_id = sa.status_acordo_id)
4. 481.054 969.228 ↑ 1.0 602,955 1

Hash Join (cost=22,500.46..55,010.95 rows=602,998 width=25) (actual time=302.499..969.228 rows=602,955 loops=1)

  • Hash Cond: (ac.prop_id = pc.prop_id)
5. 186.763 186.763 ↑ 1.0 604,000 1

Seq Scan on tb_acordo ac (cost=0.00..14,781.10 rows=604,110 width=10) (actual time=0.007..186.763 rows=604,000 loops=1)

6. 202.510 301.411 ↑ 1.0 602,997 1

Hash (cost=11,428.98..11,428.98 rows=602,998 width=23) (actual time=301.411..301.411 rows=602,997 loops=1)

  • Buckets: 524288 Batches: 2 Memory Usage: 20600kB
7. 98.901 98.901 ↑ 1.0 602,997 1

Seq Scan on tb_proposta_contrato pc (cost=0.00..11,428.98 rows=602,998 width=23) (actual time=0.009..98.901 rows=602,997 loops=1)

8. 0.003 0.009 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=18) (actual time=0.009..0.009 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on tb_status_acordo sa (cost=0.00..1.04 rows=4 width=18) (actual time=0.004..0.006 rows=4 loops=1)