explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gyUh

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 12,184.882 ↑ 1.0 1,500 1

Limit (cost=1,046,188.74..1,046,363.76 rows=1,500 width=22) (actual time=12,184.605..12,184.882 rows=1,500 loops=1)

2. 378.272 12,528.154 ↑ 5,555.5 1,500 1

Gather Merge (cost=1,046,188.74..2,018,467.03 rows=8,333,232 width=22) (actual time=12,184.604..12,528.154 rows=1,500 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 563.063 12,149.882 ↑ 2,955.0 1,410 3 / 3

Sort (cost=1,045,188.72..1,055,605.26 rows=4,166,616 width=22) (actual time=12,149.797..12,149.882 rows=1,410 loops=3)

  • Sort Key: s.bet_id NULLS FIRST, m.selection_id NULLS FIRST
  • Sort Method: top-N heapsort Memory: 199kB
  • Worker 0: Sort Method: top-N heapsort Memory: 197kB
  • Worker 1: Sort Method: top-N heapsort Memory: 200kB
4. 2,990.777 11,586.819 ↑ 1.4 2,882,477 3 / 3

Parallel Hash Left Join (cost=591,918.48..804,551.09 rows=4,166,616 width=22) (actual time=9,293.845..11,586.819 rows=2,882,477 loops=3)

  • Hash Cond: ((b.partition_id = s.partition_id) AND (b.bet_id = s.bet_id))
5. 908.298 908.298 ↑ 1.3 2,107,369 3 / 3

Parallel Index Only Scan using bet_odds_cache_p01_pkey on bet_odds_cache_p01 b (cost=0.43..109,687.86 rows=2,634,219 width=10) (actual time=0.096..908.298 rows=2,107,369 loops=3)

  • Index Cond: (partition_id = 1)
  • Heap Fetches: 0
6. 997.873 7,687.744 ↑ 1.2 3,333,333 3 / 3

Parallel Hash (cost=509,073.81..509,073.81 rows=4,166,616 width=14) (actual time=7,687.744..7,687.744 rows=3,333,333 loops=3)

  • Buckets: 524,288 Batches: 32 Memory Usage: 18,880kB
7. 3,459.041 6,689.871 ↑ 1.2 3,333,333 3 / 3

Parallel Hash Left Join (cost=228,677.23..509,073.81 rows=4,166,616 width=14) (actual time=4,410.013..6,689.871 rows=3,333,333 loops=3)

  • Hash Cond: ((s.partition_id = m.partition_id) AND (s.bet_id = m.bet_id) AND (s.selection_id = m.selection_id))
8. 1,028.027 1,028.027 ↑ 1.2 3,333,333 3 / 3

Parallel Seq Scan on bet_odds_selection_cache_p01 s (cost=0.00..125,612.70 rows=4,166,616 width=14) (actual time=0.063..1,028.027 rows=3,333,333 loops=3)

  • Filter: (partition_id = 1)
9. 1,130.247 2,202.803 ↑ 1.2 3,333,333 3 / 3

Parallel Hash (cost=135,416.59..135,416.59 rows=4,166,608 width=14) (actual time=2,202.802..2,202.803 rows=3,333,333 loops=3)

  • Buckets: 524,288 Batches: 32 Memory Usage: 18,848kB
10. 1,072.556 1,072.556 ↑ 1.2 3,333,333 3 / 3

Parallel Seq Scan on live_to_prematch_cache_p01 m (cost=0.00..135,416.59 rows=4,166,608 width=14) (actual time=0.054..1,072.556 rows=3,333,333 loops=3)

  • Filter: (partition_id = 1)
Planning time : 0.460 ms
Execution time : 12,528.351 ms