explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dqbP : fdf43f3f3f34f3f

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

Nested Loop (cost=456.78..464.84 rows=1 width=44) (actual time=1.850..1.850 rows=0 loops=1)

2. 0.002 1.850 ↓ 0.0 0 1

Subquery Scan on summary (cost=456.35..456.38 rows=1 width=8) (actual time=1.849..1.850 rows=0 loops=1)

  • Filter: (((summary.twilio_status = ANY ('{0,1,2,3}'::integer[])) OR (summary.twilio_status IS NULL)) AND (summary.sent_at < (now() - '00:02:00'::interval)))
3. 0.000 1.848 ↓ 0.0 0 1

Unique (cost=456.35..456.36 rows=1 width=24) (actual time=1.848..1.848 rows=0 loops=1)

4. 0.007 1.848 ↓ 0.0 0 1

Sort (cost=456.35..456.36 rows=1 width=24) (actual time=1.848..1.848 rows=0 loops=1)

  • Sort Key: ins_1.id, m."position" DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.001 1.841 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.65..456.34 rows=1 width=24) (actual time=1.841..1.841 rows=0 loops=1)

  • Join Filter: (sms.message_id = m.id)
6. 0.000 1.840 ↓ 0.0 0 1

Nested Loop (cost=1.09..16.95 rows=1 width=28) (actual time=1.840..1.840 rows=0 loops=1)

7. 0.002 1.841 ↓ 0.0 0 1

Nested Loop (cost=0.81..16.65 rows=1 width=24) (actual time=1.840..1.841 rows=0 loops=1)

8. 1.839 1.839 ↓ 0.0 0 1

Index Scan using index_interstitial_subscriptions_on_subscriber_id on interstitial_subscriptions ins_1 (cost=0.38..8.19 rows=1 width=16) (actual time=1.839..1.839 rows=0 loops=1)

  • Filter: (status = 0)
9. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_unique_message_per_subscription on interstitial_messages inm (cost=0.43..8.45 rows=1 width=16) (never executed)

  • Index Cond: (interstitial_subscription_id = ins_1.id)
  • Heap Fetches: 0
10. 0.000 0.000 ↓ 0.0 0

Index Scan using messages_pkey on messages m (cost=0.28..0.30 rows=1 width=12) (never executed)

  • Index Cond: (id = inm.message_id)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using index_sms_messages_on_subscriber_id on sms_messages sms (cost=0.56..437.76 rows=130 width=24) (never executed)

  • Index Cond: (subscriber_id = ins_1.subscriber_id)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using interstitial_subscriptions_pkey on interstitial_subscriptions ins (cost=0.43..8.45 rows=1 width=44) (never executed)

  • Index Cond: (id = summary.id)
Planning time : 0.894 ms
Execution time : 1.917 ms