explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KJep

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 102.021 ↑ 33.8 108 1

Sort (cost=19,767.06..19,776.19 rows=3,650 width=34) (actual time=102.018..102.021 rows=108 loops=1)

  • Sort Key: (COALESCE((sum(c.hands))::real, '0'::real)) DESC
  • Sort Method: quicksort Memory: 33kB
2. 0.032 101.999 ↑ 33.8 108 1

Hash Left Join (cost=19,495.78..19,551.10 rows=3,650 width=34) (actual time=101.974..101.999 rows=108 loops=1)

  • Hash Cond: (u_1.id = u.id)
3. 0.036 101.861 ↑ 33.8 108 1

Sort (cost=19,478.57..19,487.69 rows=3,650 width=30) (actual time=101.857..101.861 rows=108 loops=1)

  • Sort Key: (COALESCE((sum(c.hands))::real, '0'::real)) DESC
  • Sort Method: quicksort Memory: 33kB
4. 0.520 101.825 ↑ 33.8 108 1

HashAggregate (cost=19,216.98..19,262.60 rows=3,650 width=30) (actual time=101.801..101.825 rows=108 loops=1)

  • Group Key: c.season, u_1.id
5. 79.325 101.305 ↑ 17.8 2,031 1

Nested Loop Left Join (cost=0.00..18,854.55 rows=36,243 width=28) (actual time=1.182..101.305 rows=2,031 loops=1)

  • Join Filter: (c.pokerrr_id = ANY (u_1.pokerrr_ids))
  • Rows Removed by Join Filter: 739284
6. 1.670 1.670 ↑ 1.0 2,031 1

Seq Scan on cash_games_players c (cost=0.00..308.11 rows=2,031 width=19) (actual time=1.126..1.670 rows=2,031 loops=1)

  • Filter: (season = '20-04-2'::text)
  • Rows Removed by Filter: 12618
7. 20.252 20.310 ↑ 1.0 365 2,031

Materialize (cost=0.00..14.47 rows=365 width=50) (actual time=0.000..0.010 rows=365 loops=2,031)

8. 0.058 0.058 ↑ 1.0 365 1

Seq Scan on users u_1 (cost=0.00..12.65 rows=365 width=50) (actual time=0.007..0.058 rows=365 loops=1)

9. 0.044 0.106 ↑ 1.0 365 1

Hash (cost=12.65..12.65 rows=365 width=26) (actual time=0.106..0.106 rows=365 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 29kB
10. 0.062 0.062 ↑ 1.0 365 1

Seq Scan on users u (cost=0.00..12.65 rows=365 width=26) (actual time=0.011..0.062 rows=365 loops=1)

Planning time : 0.160 ms
Execution time : 102.112 ms