explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IvSQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 229.730 ↑ 1.0 1 1

inalize Aggregate (cost=71,893.66..71,893.67 rows=1 width=8) (actual time=229.730..229.730 rows=1 loops=1)

2. 3.648 231.052 ↓ 1.5 3 1

Gather (cost=71,893.45..71,893.66 rows=2 width=8) (actual time=229.528..231.052 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.172 227.404 ↑ 1.0 1 3 / 3

Partial Aggregate (cost=70,893.45..70,893.46 rows=1 width=8) (actual time=227.404..227.404 rows=1 loops=3)

4. 8.786 227.232 ↓ 2.7 2,636 3 / 3

Hash Semi Join (cost=1,053.93..70,891.01 rows=974 width=0) (actual time=122.954..227.232 rows=2,636 loops=3)

  • Hash Cond: (sl.user_id = tm.user_id)
5. 214.878 214.878 ↓ 1.2 72,252 3 / 3

Parallel Index Only Scan using sleep_aggregates_leaderboard_month_idx on sleep_aggregates_leaderboard sl (cost=0.43..69,666.14 rows=58,371 width=4) (actual time=119.259..214.878 rows=72,252 loops=3)

  • Filter: (during <@ '[2020-08-01,2020-09-01)'::daterange)
  • Rows Removed by Filter: 337,651
  • Heap Fetches: 624,478
6. 1.236 3.568 ↓ 3.0 9,829 3 / 3

Hash (cost=1,012.02..1,012.02 rows=3,319 width=4) (actual time=3.567..3.568 rows=9,829 loops=3)

  • Buckets: 16,384 (originally 4096) Batches: 1 (originally 1) Memory Usage: 474kB
7. 1.934 2.332 ↓ 3.0 9,829 3 / 3

Bitmap Heap Scan on teams_users tm (cost=219.79..1,012.02 rows=3,319 width=4) (actual time=0.431..2.332 rows=9,829 loops=3)

  • Recheck Cond: (team_id = 2,284)
  • Filter: ((created_at)::date < '2020-09-01'::date)
  • Rows Removed by Filter: 45
  • Heap Blocks: exact=307
8. 0.398 0.398 ↑ 1.0 9,874 3 / 3

Bitmap Index Scan on teams_users_team_id_index (cost=0.00..218.96 rows=9,956 width=0) (actual time=0.398..0.398 rows=9,874 loops=3)

  • Index Cond: (team_id = 2,284)
Planning time : 0.274 ms
Execution time : 231.100 ms