explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xmhe

Settings
# exclusive inclusive rows x rows loops node
1. 0.619 4,874.142 ↑ 1.0 1 1

Unique (cost=227.92..227.93 rows=1 width=258) (actual time=4,873.397..4,874.142 rows=1 loops=1)

2. 22.826 4,873.523 ↓ 3,672.0 3,672 1

Sort (cost=227.92..227.93 rows=1 width=258) (actual time=4,873.395..4,873.523 rows=3,672 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: 1990kB
3. 4.697 4,850.697 ↓ 3,672.0 3,672 1

Nested Loop (cost=1.12..227.91 rows=1 width=258) (actual time=1.540..4,850.697 rows=3,672 loops=1)

4. 6.032 6.032 ↓ 3,472.0 3,472 1

Index Scan using ix_company_id_attendee_id_is_all_day on events_to_attendees events_to_attendees_1 (cost=0.56..7.16 rows=1 width=250) (actual time=0.050..6.032 rows=3,472 loops=1)

  • Index Cond: ((company_id = '\x52660716acd14508e3d32b4b'::bytea) AND (attendee_id = ANY ('{salesgirl@irreverentsalesgirl.com,5673202eb2a6bd253857d223}'::text[])) AND (is_all_day = false))
  • Filter: (is_all_day IS FALSE)
5. 4,839.968 4,839.968 ↓ 0.0 1 3,472

Index Only Scan using events_to_attendees_dtimes_pkey on events_to_attendees_dtimes events_to_attendees_dtimes_1 (cost=0.56..220.75 rows=1width=34) (cost=0..0 rows=0 width=0) (actual time=0.699..1.394 rows=1 loops=3,472)

  • Index Cond: ((company_id = '\x52660716acd14508e3d32b4b'::bytea) AND (end_dtime <= '2020-03-19 22:05:46.50001+00'::timestamp with time zone) AND (eta_id = events_to_attendees_1.id))
  • Heap Fetches: 240
Planning time : 0.480 ms
Execution time : 4,874.709 ms