explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OUEP

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Merge Join (cost=922,030.00..1,182,253.26 rows=1,113,250 width=4) (actual rows= loops=)

  • Merge Cond: (users.user_id = ads.user_id)
2. 0.000 0.000 ↓ 0.0

Index Only Scan using users_pkey on users (cost=0.43..216,713.13 rows=10,745,470 width=4) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=922,029.46..924,812.59 rows=1,113,250 width=8) (actual rows= loops=)

  • Sort Key: ads.user_id
4. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ads (cost=69,410.83..810,223.84 rows=1,113,250 width=8) (actual rows= loops=)

  • Recheck Cond: ((status)::text = 'active'::text)
  • Filter: ((hashed SubPlan 1) OR (hashed SubPlan 2))
5. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_ads_status (cost=0.00..67,698.06 rows=1,484,333 width=0) (actual rows= loops=)

  • Index Cond: ((status)::text = 'active'::text)
6.          

SubPlan (forBitmap Heap Scan)

7. 0.000 0.000 ↓ 0.0

Index Scan using action_states_state_id_key on action_states (cost=0.57..1,433.08 rows=184 width=4) (actual rows= loops=)

  • Index Cond: ((state_id > 934620114) AND (state_id <= 934621114))
  • Filter: ((state)::text = ANY ('{pending_bump_daily,pending_bump_14,accepted,insurance_active,insurance_cancel,undo_deleted,activated}'::text[]))
8. 0.000 0.000 ↓ 0.0

Seq Scan on index_patch_ads (cost=0.00..0.92 rows=1 width=4) (actual rows= loops=)

  • Filter: ((index_time <= now()) AND (index_time >= (now() - '00:20:00'::interval)))