explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rOKg : Optimization for: plan #wFQp

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 16.021 59,759.678 ↓ 0.0 0 1

Insert on ct_co0122_1_past (cost=652,604.60..702,639.76 rows=808,902 width=133) (actual time=59,759.678..59,759.678 rows=0 loops=1)

2. 6,267.523 59,743.657 ↑ 235.4 3,436 1

Merge Semi Join (cost=652,604.60..702,639.76 rows=808,902 width=133) (actual time=41,462.791..59,743.657 rows=3,436 loops=1)

  • Merge Cond: (present.columnhash = bfc.columnhash)
  • Join Filter: ((bfc.amount <> present.amount) OR (bfc.convamount <> present.convamount) OR (bfc.consamount <> present.consamount) OR (bfc.data_comment <> present.data_comment))
  • Rows Removed by Join Filter: 1614412
3. 25,611.894 26,485.141 ↓ 1.0 1,617,848 1

Sort (cost=378,738.59..382,783.11 rows=1,617,805 width=193) (actual time=19,321.848..26,485.141 rows=1,617,848 loops=1)

  • Sort Key: present.columnhash
  • Sort Method: external merge Disk: 289600kB
4. 873.247 873.247 ↓ 1.0 1,617,848 1

Seq Scan on ct_co0122_1_present present (cost=0.00..57,068.05 rows=1,617,805 width=193) (actual time=0.007..873.247 rows=1,617,848 loops=1)

5. 1,485.490 26,990.993 ↓ 1.1 1,614,771 1

Materialize (cost=273,866.01..281,230.18 rows=1,472,835 width=88) (actual time=22,071.456..26,990.993 rows=1,614,771 loops=1)

6. 24,168.421 25,505.503 ↓ 1.1 1,611,694 1

Sort (cost=273,866.01..277,548.09 rows=1,472,835 width=88) (actual time=22,071.450..25,505.503 rows=1,611,694 loops=1)

  • Sort Key: bfc.columnhash
  • Sort Method: external merge Disk: 168040kB
7. 1,337.082 1,337.082 ↓ 1.1 1,611,694 1

Seq Scan on ct_co0122_1_hash bfc (cost=0.00..52,493.35 rows=1,472,835 width=88) (actual time=0.038..1,337.082 rows=1,611,694 loops=1)

Planning time : 0.322 ms
Execution time : 59,798.165 ms