explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ONqp

Settings
# exclusive inclusive rows x rows loops node
1. 0.055 18.771 ↓ 239.0 239 1

Unique (cost=243.19..243.22 rows=1 width=64) (actual time=18.705..18.771 rows=239 loops=1)

2. 0.180 18.716 ↓ 239.0 239 1

Sort (cost=243.19..243.20 rows=1 width=64) (actual time=18.704..18.716 rows=239 loops=1)

  • Sort Key: se.scheduled_email_transmission_id, se.property_id, ee.id, ee.delivered_on, ee.opened_on, ee.bounced_on, ee.email_event_type_id, ee.clicked_on, ee.spammed_on, ee.deferred_on
  • Sort Method: quicksort Memory: 44kB
3. 4.795 18.536 ↓ 239.0 239 1

Nested Loop Left Join (cost=1.57..243.18 rows=1 width=64) (actual time=1.119..18.536 rows=239 loops=1)

  • Join Filter: (ser.id = ee.system_email_recipient_id)
  • Rows Removed by Join Filter: 56883
4. 0.058 1.552 ↓ 239.0 239 1

Nested Loop Left Join (cost=1.00..238.54 rows=1 width=20) (actual time=0.775..1.552 rows=239 loops=1)

  • Filter: ((se.applicant_id IS NOT NULL) OR (ser.id IS NOT NULL))
  • Rows Removed by Filter: 39
5. 0.934 0.934 ↓ 40.0 40 1

Index Scan using idx_system_emails_custom_partial_cid_pid_sent_on on system_emails se (cost=0.43..233.89 rows=1 width=20) (actual time=0.068..0.934 rows=40 loops=1)

  • Index Cond: ((cid = 12859) AND (property_id = ANY ('{218059,218060,218061,218062,218063,218064,218065,218066,218067,218068,218069,218070,218071,218072,218073,218074,218075,218076,218077,218078,218079,218080,218081,218082,218083,218084,218085,218087,218088,218089,218090,218092,218093,218094,218095,218096,218097,218098,218099,218100,218101,218102,218103,218104,218105,218106,218107,218108,218109,218110,218111,218112,218113,218114,218115,218116,218118,218119,218120,218121,218122,218123,218124,218126,218127,218128,218129,218130,227292,227294,227295,241633,252494,252495,252496,260128,261521,334998,348949,507160,518395,525519,526083,536150,536151,536152,553957,570963,761510,843826,843827,886853,908584,960652}'::integer[])) AND (sent_on >= '2019-04-01 00:00:00-06'::timestamp with time zone) AND (sent_on <= '2019-04-03 00:00:00-06'::timestamp with time zone) AND (customer_id IS NULL))
  • Filter: ((company_employee_id IS NULL) AND (system_email_type_id = 62))
6. 0.560 0.560 ↓ 6.0 6 40

Index Scan using idx_system_email_recipients_custom_system_email_id on system_email_recipients ser (cost=0.57..4.62 rows=1 width=12) (actual time=0.004..0.014 rows=6 loops=40)

  • Index Cond: ((cid = se.cid) AND (cid = 12859) AND (recipient_type_id = 1) AND (system_email_id = se.id))
7. 12.189 12.189 ↓ 239.0 239 239

Index Scan using idx_email_events_system_email_id on email_events ee (cost=0.57..4.61 rows=1 width=68) (actual time=0.005..0.051 rows=239 loops=239)

  • Index Cond: (system_email_id = se.id)
  • Filter: ((cid = 12859) AND (cid = se.cid))
Planning time : 3.164 ms