explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iqK

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.268 ↓ 0.0 0 1

Nested Loop (cost=4.62..42.90 rows=1 width=156) (actual time=0.268..0.268 rows=0 loops=1)

  • Join Filter: (premium_user_subscriptions.user_id = fcms.user_id)
2. 0.003 0.206 ↑ 7.0 1 1

Nested Loop (cost=4.48..37.59 rows=7 width=12) (actual time=0.118..0.206 rows=1 loops=1)

3. 0.007 0.130 ↑ 7.0 1 1

Nested Loop (cost=4.20..34.96 rows=7 width=8) (actual time=0.043..0.130 rows=1 loops=1)

4. 0.105 0.105 ↑ 2.0 1 1

Seq Scan on subscriptions (cost=0.00..9.47 rows=2 width=8) (actual time=0.021..0.105 rows=1 loops=1)

  • Filter: ((end_at >= '2018-09-29 17:00:00'::timestamp without time zone) AND (end_at <= '2018-09-30 16:59:59.999999'::timestamp without time zone))
  • Rows Removed by Filter: 355
5. 0.009 0.018 ↑ 6.0 1 1

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

  • Recheck Cond: (subscription_id = subscriptions.id)
  • Heap Blocks: exact=1
6. 0.009 0.009 ↑ 6.0 1 1

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

  • Index Cond: (subscription_id = subscriptions.id)
7. 0.073 0.073 ↑ 1.0 1 1

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

  • Index Cond: (id = premium_user_subscriptions.user_id)
  • Heap Fetches: 0
8. 0.058 0.058 ↓ 0.0 0 1

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

  • Index Cond: (user_id = users.id)