explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kgth

Settings
# exclusive inclusive rows x rows loops node
1. 111.138 4,768.773 ↑ 1.0 600,942 1

Unique (cost=142,917.83..147,440.27 rows=602,992 width=43) (actual time=4,427.341..4,768.773 rows=600,942 loops=1)

2. 3,484.944 4,657.635 ↑ 1.0 602,949 1

Sort (cost=142,917.83..144,425.31 rows=602,992 width=43) (actual time=4,427.339..4,657.635 rows=602,949 loops=1)

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

Hash Join (cost=22,501.41..66,475.23 rows=602,992 width=43) (actual time=326.719..1,172.691 rows=602,949 loops=1)

  • Hash Cond: (ac.acordo_status_id = sa.status_acordo_id)
4. 444.825 951.363 ↑ 1.0 602,949 1

Hash Join (cost=22,500.32..55,168.04 rows=602,992 width=25) (actual time=326.699..951.363 rows=602,949 loops=1)

  • Hash Cond: (ac.prop_id = pc.prop_id)
5. 180.849 180.849 ↑ 1.0 603,994 1

Seq Scan on tb_acordo ac (cost=0.00..14,847.49 rows=610,749 width=10) (actual time=0.006..180.849 rows=603,994 loops=1)

6. 233.519 325.689 ↑ 1.0 602,991 1

Hash (cost=11,428.92..11,428.92 rows=602,992 width=23) (actual time=325.689..325.689 rows=602,991 loops=1)

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

Seq Scan on tb_proposta_contrato pc (cost=0.00..11,428.92 rows=602,992 width=23) (actual time=0.007..92.170 rows=602,991 loops=1)

8. 0.002 0.008 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=18) (actual time=0.008..0.008 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)

Planning time : 0.294 ms
Execution time : 4,837.681 ms