explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZGKH

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

Unique (cost=142,760.54..147,282.98 rows=602,992 width=43) (actual time=4,178.996..4,484.629 rows=600,948 loops=1)

2. 3,252.300 4,384.355 ↑ 1.0 602,955 1

Sort (cost=142,760.54..144,268.02 rows=602,992 width=43) (actual time=4,178.995..4,384.355 rows=602,955 loops=1)

  • Sort Key: pc.contr_contrato, ((ac.acordo_numero)::integer) DESC
  • Sort Method: external merge Disk: 32,784kB
3. 225.184 1,132.055 ↑ 1.0 602,955 1

Hash Join (cost=22,501.41..66,317.94 rows=602,992 width=43) (actual time=300.681..1,132.055 rows=602,955 loops=1)

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

Hash Join (cost=22,500.32..55,010.75 rows=602,992 width=25) (actual time=300.646..906.856 rows=602,955 loops=1)

  • Hash Cond: (ac.prop_id = pc.prop_id)
5. 177.508 177.508 ↑ 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.012..177.508 rows=604,000 loops=1)

6. 182.114 299.164 ↓ 1.0 602,997 1

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

  • Buckets: 524,288 Batches: 2 Memory Usage: 20,600kB
7. 117.050 117.050 ↓ 1.0 602,997 1

Seq Scan on tb_proposta_contrato pc (cost=0.00..11,428.92 rows=602,992 width=23) (actual time=0.017..117.050 rows=602,997 loops=1)

8. 0.005 0.015 ↑ 1.0 4 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.010 0.010 ↑ 1.0 4 1

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