explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GEML

Settings
# exclusive inclusive rows x rows loops node
1. 0.439 7,191.581 ↓ 98.0 98 1

Sort (cost=216,867.44..216,867.44 rows=1 width=128) (actual time=7,191.566..7,191.581 rows=98 loops=1)

  • Sort Key: communication_emailevent."timestamp" DESC
  • Sort Method: quicksort Memory: 38kB
2. 0.173 7,191.142 ↓ 98.0 98 1

Nested Loop Left Join (cost=1,305.55..216,867.43 rows=1 width=128) (actual time=4,639.343..7,191.142 rows=98 loops=1)

3. 1.297 7,168.723 ↓ 98.0 98 1

Nested Loop (cost=1,305.12..216,858.97 rows=1 width=74) (actual time=4,638.638..7,168.723 rows=98 loops=1)

  • Join Filter: (communication_communicationprocess.owner_id = user_profile_advisoraccount.id)
  • Rows Removed by Join Filter: 4704
4. 0.192 7,128.520 ↓ 98.0 98 1

Nested Loop (cost=1,300.17..216,681.48 rows=1 width=78) (actual time=4,633.908..7,128.520 rows=98 loops=1)

5. 7,049.190 7,119.900 ↓ 98.0 98 1

Bitmap Heap Scan on communication_emailevent (cost=1,299.74..216,673.03 rows=1 width=74) (actual time=4,633.324..7,119.900 rows=98 loops=1)

  • Recheck Cond: ((event)::text = 'P'::text)
  • Rows Removed by Index Recheck: 3579345
  • Filter: (("timestamp" >= '2017-12-01 12:46:00-05'::timestamp with time zone) AND ((info)::text = 'G'::text))
  • Rows Removed by Filter: 99330
  • Heap Blocks: exact=28783 lossy=55574
6. 70.710 70.710 ↓ 1.4 99,520 1

Bitmap Index Scan on communication_emailevent_event_da0e221f_uniq (cost=0.00..1,299.74 rows=70,290 width=0) (actual time=70.710..70.710 rows=99,520 loops=1)

  • Index Cond: ((event)::text = 'P'::text)
7. 8.428 8.428 ↑ 1.0 1 98

Index Scan using communication_communicationprocess_pkey on communication_communicationprocess (cost=0.42..8.44 rows=1 width=8) (actual time=0.086..0.086 rows=1 loops=98)

  • Index Cond: (process_ptr_id = communication_emailevent.process_id)
8. 2.940 38.906 ↓ 3.8 49 98

Nested Loop (cost=4.95..177.33 rows=13 width=4) (actual time=0.041..0.397 rows=49 loops=98)

9. 3.136 21.560 ↓ 3.8 49 98

Nested Loop (cost=4.67..132.00 rows=13 width=12) (actual time=0.033..0.220 rows=49 loops=98)

10. 2.156 4.018 ↓ 3.8 49 98

Bitmap Heap Scan on auth_user_groups (cost=4.39..43.97 rows=13 width=4) (actual time=0.024..0.041 rows=49 loops=98)

  • Recheck Cond: (group_id = 10)
  • Heap Blocks: exact=1078
11. 1.862 1.862 ↓ 3.8 49 98

Bitmap Index Scan on auth_user_groups_0e939a4f (cost=0.00..4.38 rows=13 width=0) (actual time=0.019..0.019 rows=49 loops=98)

  • Index Cond: (group_id = 10)
12. 14.406 14.406 ↑ 1.0 1 4,802

Index Scan using user_profile_advisoraccount_user_id_key on user_profile_advisoraccount (cost=0.28..6.76 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=4,802)

  • Index Cond: (user_id = auth_user_groups.user_id)
13. 14.406 14.406 ↑ 1.0 1 4,802

Index Only Scan using auth_user_pkey on auth_user (cost=0.28..3.48 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=4,802)

  • Index Cond: (id = user_profile_advisoraccount.user_id)
  • Heap Fetches: 4802
14. 22.246 22.246 ↑ 1.0 1 98

Index Scan using contact_contact_pkey on contact_contact (cost=0.43..8.45 rows=1 width=54) (actual time=0.226..0.227 rows=1 loops=98)

  • Index Cond: (communication_emailevent.recipient_id = id)