explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SRDe

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 0.592 ↓ 13.0 13 1

Unique (cost=42.91..42.92 rows=1 width=156) (actual time=0.575..0.592 rows=13 loops=1)

2. 0.059 0.579 ↓ 25.0 25 1

Sort (cost=42.91..42.91 rows=1 width=156) (actual time=0.574..0.579 rows=25 loops=1)

  • Sort Key: fcms.token
  • Sort Method: quicksort Memory: 31kB
3. 0.034 0.520 ↓ 25.0 25 1

Nested Loop (cost=4.62..42.90 rows=1 width=156) (actual time=0.077..0.520 rows=25 loops=1)

  • Join Filter: (premium_user_subscriptions.user_id = fcms.user_id)
4. 0.030 0.402 ↓ 6.0 42 1

Nested Loop (cost=4.48..37.59 rows=7 width=12) (actual time=0.054..0.402 rows=42 loops=1)

5. 0.063 0.246 ↓ 6.0 42 1

Nested Loop (cost=4.20..34.96 rows=7 width=8) (actual time=0.021..0.246 rows=42 loops=1)

6. 0.060 0.060 ↓ 20.5 41 1

Seq Scan on subscriptions (cost=0.00..9.47 rows=2 width=8) (actual time=0.007..0.060 rows=41 loops=1)

  • Filter: ((end_at >= '2018-09-01 17:00:00'::timestamp without time zone) AND (end_at <= '2018-09-28 16:59:59.999999'::timestamp without time zone))
  • Rows Removed by Filter: 317
7. 0.082 0.123 ↑ 6.0 1 41

Bitmap Heap Scan on premium_user_subscriptions (cost=4.20..12.68 rows=6 width=16) (actual time=0.003..0.003 rows=1 loops=41)

  • Recheck Cond: (subscription_id = subscriptions.id)
  • Heap Blocks: exact=41
8. 0.041 0.041 ↑ 6.0 1 41

Bitmap Index Scan on index_premium_user_subscriptions_on_subscription_id (cost=0.00..4.20 rows=6 width=0) (actual time=0.001..0.001 rows=1 loops=41)

  • Index Cond: (subscription_id = subscriptions.id)
9. 0.126 0.126 ↑ 1.0 1 42

Index Only Scan using users_pkey on users (cost=0.28..0.38 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=42)

  • Index Cond: (id = premium_user_subscriptions.user_id)
  • Heap Fetches: 25
10. 0.084 0.084 ↑ 12.0 1 42

Index Scan using index_fcms_on_user_id on fcms (cost=0.15..0.61 rows=12 width=164) (actual time=0.002..0.002 rows=1 loops=42)

  • Index Cond: (user_id = users.id)