explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T1fG

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

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

2. 3,562.552 4,777.892 ↑ 1.0 602,955 1

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

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

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

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

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

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

6. 180.657 291.141 ↓ 1.0 602,997 1

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

  • Buckets: 524288 Batches: 2 Memory Usage: 20600kB
7. 110.484 110.484 ↓ 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.009..110.484 rows=602,997 loops=1)

8. 0.002 0.010 ↑ 1.0 4 1

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

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

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

Planning time : 0.266 ms
Execution time : 4,969.726 ms