explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aZcl

Settings
# exclusive inclusive rows x rows loops node
1. 2.625 502.715 ↓ 35.0 35 1

Unique (cost=10,458.21..10,458.22 rows=1 width=258) (actual time=499.538..502.715 rows=35 loops=1)

2. 71.621 500.090 ↓ 12,480.0 12,480 1

Sort (cost=10,458.21..10,458.21 rows=1 width=258) (actual time=499.537..500.090 rows=12,480 loops=1)

  • Sort Key: events_to_attendees_dtimes_1.user_id DESC, events_to_attendees_1.attendee_id DESC, events_to_attendees_dtimes_1.end_dtime DESC
  • Sort Method: quicksort Memory: 6820kB
3. 12.783 428.469 ↓ 12,480.0 12,480 1

Nested Loop (cost=1.12..10,458.20 rows=1 width=258) (actual time=3.820..428.469 rows=12,480 loops=1)

4. 299.570 299.570 ↓ 229.5 10,556 1

Index Scan using ix_company_id_attendee_id_is_all_day on events_to_attendees events_to_attendees_1 (cost=0.56..81.28 rows=46 width=250) (actual time=3.797..299.570 rows=10,556 loops=1)

  • Index Cond: ((company_id = '\x5077eb0dabfa0fc9a0641e65'::bytea) AND (attendee_id = ANY ('{jmahan@tasteofpurple.com,mahan.joshua@outlook.com,jmahan@cc-techgroup.com,gina.celli@accu-tech.com,tpalumbo@cc-techgroup.com,9178637463@vtext.com,kernst@cc-techgroup.com,5dee70dbec8d832b3faa013e,5de92883f92ea1b9fdb1fede,5de9545fec8d836bb869d0c6,5de962e0f92ea1b9fdb20f66}'::text[])) AND (is_all_day = false))
  • Filter: (is_all_day IS FALSE)
5. 116.116 116.116 ↑ 1.0 1 10,556

Index Scan using events_to_attendees_dtimes_pkey on events_to_attendees_dtimes events_to_attendees_dtimes_1 (cost=0.56..225.58 rows=1 width=34) (actual time=0.010..0.011 rows=1 loops=10,556)

  • Index Cond: ((eta_id = events_to_attendees_1.id) AND (end_dtime <= '2020-03-19 00:29:19.085089+00'::timestamp with time zone))
  • Filter: (company_id = '\x5077eb0dabfa0fc9a0641e65'::bytea)
Planning time : 5.225 ms
Execution time : 504.730 ms