explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oIwT

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.125 9.125 ↓ 2.0 50 1

Sort (cost=47.43..47.50 rows=25 width=2,050) (actual time=9.112..9.125 rows=50 loops=1)

  • Sort Key: finished_matches."matchEndedTime" DESC
  • Sort Method: quicksort Memory: 38kB
2.          

CTE finished_matches

3. 0.019 8.831 ↑ 1.0 50 1

Limit (cost=0.29..9.84 rows=50 width=135) (actual time=5.615..8.831 rows=50 loops=1)

4. 8.812 8.812 ↑ 1,192.2 50 1

Index Scan Backward using matches_dota2_matchendedtime_idx on dota2 (cost=0.29..11,384.04 rows=59,611 width=135) (actual time=5.613..8.812 rows=50 loops=1)

  • Filter: (state = '4'::numeric)
  • Rows Removed by Filter: 7219
5. 0.064 9.000 ↓ 2.0 50 1

Hash Right Join (cost=1.62..37.01 rows=25 width=2,050) (actual time=8.950..9.000 rows=50 loops=1)

  • Hash Cond: (mr.id = finished_matches.id)
  • Filter: (COALESCE(mr."ratingsAdjusted", false) IS FALSE)
6. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on matchesratings mr (cost=0.00..28.10 rows=1,810 width=17) (actual time=0.012..0.012 rows=0 loops=1)

7. 0.057 8.924 ↑ 1.0 50 1

Hash (cost=1.00..1.00 rows=50 width=2,041) (actual time=8.924..8.924 rows=50 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
8. 8.867 8.867 ↑ 1.0 50 1

CTE Scan on finished_matches (cost=0.00..1.00 rows=50 width=2,041) (actual time=5.622..8.867 rows=50 loops=1)