explain.depesz.com

A tool for finding a real cause for slow queries.

Result: y1MC

options
exclusive inclusive rows x rows loops node
0.004 8181.373 ↑ 1.0 20 1

Limit (cost=328465.64..328466.19 rows=20 width=34) (actual time=8181.358..8181.373 rows=20 loops=1)

0.011 8181.369 ↑ 68668.6 20 1

Unique (cost=328465.64..366233.34 rows=1373371 width=34) (actual time=8181.357..8181.369 rows=20 loops=1)

4196.639 8181.358 ↑ 68668.6 20 1

Sort (cost=328465.64..331899.07 rows=1373371 width=34) (actual time=8181.356..8181.358 rows=20 loops=1)

  • Sort Key: l.placement_id, m.event_id, m.id, o.id, h.handicap, sl.price_num, sl.price_den, sl.result_cname, sl.manual_result, sl.live
  • Sort Method: external sort Disk: 59992kB
867.594 3984.719 ↓ 1.0 1375272 1

Hash Join (cost=66346.22..150900.34 rows=1373371 width=34) (actual time=1848.378..3984.719 rows=1375272 loops=1)

  • Hash Cond: (ls.line_id = l.id)
1114.245 2818.674 ↓ 1.0 1375272 1

Hash Join (cost=50604.36..104257.64 rows=1373371 width=34) (actual time=1549.831..2818.674 rows=1375272 loops=1)

  • Hash Cond: (ls.selection_id = sl.id)
154.890 154.890 ↓ 1.0 1375272 1

Seq Scan on lines_selections ls (cost=0.00..21035.71 rows=1373371 width=8) (actual time=0.009..154.890 rows=1375272 loops=1)

314.530 1549.539 ↑ 1.0 573604 1

Hash (cost=43410.50..43410.50 rows=575509 width=34) (actual time=1549.539..1549.539 rows=573604 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 38107kB
519.509 1235.009 ↑ 1.0 573604 1

Hash Join (cost=21259.62..43410.50 rows=575509 width=34) (actual time=600.527..1235.009 rows=573604 loops=1)

  • Hash Cond: (sl.handicap_id = h.id)
115.118 115.118 ↑ 1.0 573604 1

Seq Scan on selections sl (cost=0.00..11360.09 rows=575509 width=22) (actual time=0.004..115.118 rows=573604 loops=1)

71.453 600.382 ↑ 1.0 165037 1

Hash (cost=19174.42..19174.42 rows=166816 width=20) (actual time=600.382..600.382 rows=165037 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 8381kB
212.580 528.929 ↑ 1.0 165037 1

Hash Join (cost=12123.38..19174.42 rows=166816 width=20) (actual time=282.996..528.929 rows=165037 loops=1)

  • Hash Cond: (h.outcome_id = o.id)
33.388 33.388 ↑ 1.0 165037 1

Seq Scan on handicaps h (cost=0.00..3089.16 rows=166816 width=12) (actual time=0.007..33.388 rows=165037 loops=1)

57.058 282.961 ↓ 1.0 154862 1

Hash (cost=10198.88..10198.88 rows=153960 width=12) (actual time=282.961..282.961 rows=154862 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 6655kB
135.690 225.903 ↓ 1.0 154862 1

Hash Join (cost=3711.08..10198.88 rows=153960 width=12) (actual time=59.081..225.903 rows=154862 loops=1)

  • Hash Cond: (o.market_id = m.id)
31.217 31.217 ↓ 1.0 154862 1

Seq Scan on outcomes o (cost=0.00..3408.60 rows=153960 width=8) (actual time=0.007..31.217 rows=154862 loops=1)

33.197 58.996 ↑ 1.0 103017 1

Hash (cost=2401.59..2401.59 rows=104759 width=8) (actual time=58.996..58.996 rows=103017 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4025kB
25.799 25.799 ↑ 1.0 103017 1

Seq Scan on markets m (cost=0.00..2401.59 rows=104759 width=8) (actual time=0.007..25.799 rows=103017 loops=1)

164.416 298.451 ↑ 1.0 526417 1

Hash (cost=9139.16..9139.16 rows=528216 width=8) (actual time=298.451..298.451 rows=526417 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 20564kB
134.035 134.035 ↑ 1.0 526417 1

Seq Scan on lines l (cost=0.00..9139.16 rows=528216 width=8) (actual time=0.011..134.035 rows=526417 loops=1)