explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ha6G

Settings
# exclusive inclusive rows x rows loops node
1. 580,878.308 765,353.649 ↓ 1.7 1,797,661,655 1

Merge Join (cost=3,964,822.87..28,809,914.76 rows=1,073,204,312 width=37) (actual time=48,984.743..765,353.649 rows=1,797,661,655 loops=1)

  • Merge Cond: ((h1.underlying = h2.underlying) AND (h1.type = h2.type) AND (h1.expiration = h2.expiration) AND (h1.strike = h2.strike))
2. 52,495.104 56,516.582 ↑ 1.5 11,491,245 1

Sort (cost=3,964,822.31..4,007,554.73 rows=17,092,968 width=37) (actual time=48,978.429..56,516.582 rows=11,491,245 loops=1)

  • Sort Key: h1.underlying, h1.type, h1.expiration, h1.strike
  • Sort Method: external merge Disk: 566,112kB
3. 4,021.478 4,021.478 ↑ 1.5 11,491,245 1

Seq Scan on historic_data h1 (cost=0.00..509,207.68 rows=17,092,968 width=37) (actual time=0.249..4,021.478 rows=11,491,245 loops=1)

4. 124,378.513 127,958.759 ↓ 105.2 1,797,661,650 1

Materialize (cost=0.56..527,065.75 rows=17,092,968 width=17) (actual time=6.303..127,958.759 rows=1,797,661,650 loops=1)

5. 3,580.246 3,580.246 ↑ 1.5 11,491,245 1

Index Only Scan using historic_data_underlying_type_expiration_strike_index on historic_data h2 (cost=0.56..484,333.33 rows=17,092,968 width=17) (actual time=6.298..3,580.246 rows=11,491,245 loops=1)

  • Heap Fetches: 83
Planning time : 4.676 ms
Execution time : 871,915.144 ms