explain.depesz.com

PostgreSQL's explain analyze made readable

Result: j8Sb

Settings
# exclusive inclusive rows x rows loops node
1. 0.272 13.291 ↓ 104.0 208 1

Sort (cost=926.40..926.41 rows=2 width=88) (actual time=13.238..13.291 rows=208 loops=1)

  • Sort Key: recoveries.cycle_id
  • Sort Method: quicksort Memory: 54kB
2. 7.441 13.019 ↓ 104.0 208 1

Nested Loop (cost=2.68..926.39 rows=2 width=88) (actual time=0.227..13.019 rows=208 loops=1)

  • Join Filter: (recoveries.sleep_id = sleeps.activity_id)
3. 0.343 4.276 ↓ 108.5 217 1

Nested Loop (cost=2.12..924.49 rows=2 width=50) (actual time=0.101..4.276 rows=217 loops=1)

4. 0.469 2.631 ↓ 108.5 217 1

Nested Loop (cost=1.55..923.23 rows=2 width=46) (actual time=0.090..2.631 rows=217 loops=1)

5. 0.138 0.657 ↓ 107.5 215 1

Nested Loop (cost=0.99..906.05 rows=2 width=30) (actual time=0.078..0.657 rows=215 loops=1)

6. 0.011 0.011 ↑ 1.0 1 1

Index Scan using profiles_pkey1 on profiles (cost=0.42..8.44 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: (user_id = 226,103)
7. 0.508 0.508 ↓ 107.5 215 1

Index Scan using cycles_user_id_data_state_idx on cycles (cost=0.56..897.59 rows=2 width=30) (actual time=0.067..0.508 rows=215 loops=1)

  • Index Cond: (user_id = 226,103)
  • Filter: ((day_strain IS NOT NULL) AND (lower(days) >= '2019-01-01'::date) AND (lower(days) <= '2020-08-01'::date))
  • Rows Removed by Filter: 33
8. 1.505 1.505 ↑ 1.0 1 215

Index Scan using recoveries_cycle_id on recoveries (cost=0.56..8.58 rows=1 width=20) (actual time=0.007..0.007 rows=1 loops=215)

  • Index Cond: (cycle_id = cycles.id)
  • Filter: (recovery_score IS NOT NULL)
  • Rows Removed by Filter: 0
9. 1.302 1.302 ↑ 1.0 1 217

Index Only Scan using activities_pkey on activities (cost=0.57..0.63 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=217)

  • Index Cond: (id = recoveries.sleep_id)
  • Heap Fetches: 0
10. 1.302 1.302 ↑ 1.0 1 217

Index Scan using sleeps_pkey on sleeps (cost=0.56..0.66 rows=1 width=28) (actual time=0.006..0.006 rows=1 loops=217)

  • Index Cond: (activity_id = activities.id)
  • Filter: ((score IS NOT NULL) AND (NOT is_nap))
  • Rows Removed by Filter: 0
Planning time : 1.034 ms
Execution time : 13.450 ms