explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UnOP

Settings
# exclusive inclusive rows x rows loops node
1. 1,371.704 98,244.024 ↑ 88,195.5 2 1

GroupAggregate (cost=411,519.48..415,488.27 rows=176,391 width=33) (actual time=96,878.580..98,244.024 rows=2 loops=1)

  • Group Key: o.outcome_type_cname, o.name, o.cname
2. 3,266.176 96,872.320 ↑ 1.1 167,592 1

Sort (cost=411,519.48..411,960.45 rows=176,391 width=33) (actual time=95,494.766..96,872.320 rows=167,592 loops=1)

  • Sort Key: o.outcome_type_cname, o.name, o.cname
  • Sort Method: external merge Disk: 5232kB
3. 4,456.261 93,606.144 ↑ 1.1 167,592 1

Nested Loop (cost=3,011.97..391,321.90 rows=176,391 width=33) (actual time=3,121.010..93,606.144 rows=167,592 loops=1)

4. 1,890.468 76,689.743 ↓ 2.0 113,274 1

Hash Join (cost=3,011.53..231,214.61 rows=55,770 width=4) (actual time=3,120.944..76,689.743 rows=113,274 loops=1)

  • Hash Cond: (m.event_id = e.id)
5. 36,188.107 71,680.961 ↓ 2.0 113,274 1

Hash Join (cost=31.00..226,909.54 rows=55,770 width=8) (actual time=2.587..71,680.961 rows=113,274 loops=1)

  • Hash Cond: ((m.name)::text = (mt.name)::text)
6. 35,491.320 35,491.320 ↑ 1.0 4,388,315 1

Seq Scan on markets m (cost=0.00..138,528.28 rows=4,389,628 width=40) (actual time=0.016..35,491.320 rows=4,388,315 loops=1)

7. 0.121 1.534 ↑ 1.0 14 1

Hash (cost=30.83..30.83 rows=14 width=33) (actual time=1.534..1.534 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
8. 1.413 1.413 ↑ 1.0 14 1

Seq Scan on market_types mt (cost=0.00..30.83 rows=14 width=33) (actual time=1.141..1.413 rows=14 loops=1)

  • Filter: ((name2)::text = '[Total Goals] X.5'::text)
  • Rows Removed by Filter: 772
9. 613.821 3,118.314 ↑ 1.0 70,468 1

Hash (cost=2,099.68..2,099.68 rows=70,468 width=4) (actual time=3,118.314..3,118.314 rows=70,468 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 2478kB
10. 2,504.493 2,504.493 ↑ 1.0 70,468 1

Seq Scan on events e (cost=0.00..2,099.68 rows=70,468 width=4) (actual time=0.548..2,504.493 rows=70,468 loops=1)

11. 12,460.140 12,460.140 ↑ 74.0 1 113,274

Index Scan using outcomes_market_id_index on outcomes o (cost=0.43..2.13 rows=74 width=37) (actual time=0.095..0.110 rows=1 loops=113,274)

  • Index Cond: (market_id = m.id)
Planning time : 12.243 ms
Execution time : 98,246.342 ms