explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1VIW : Optimization for: plan #C8Tx

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.073 0.657 ↑ 1.0 1 1

Sort (cost=16.55..16.55 rows=1 width=970) (actual time=0.653..0.657 rows=1 loops=1)

  • Sort Key: persons.first_name, persons.last_name, persons.person_id
  • Sort Method: quicksort Memory: 26kB
2. 0.022 0.584 ↑ 1.0 1 1

GroupAggregate (cost=16.47..16.54 rows=1 width=970) (actual time=0.580..0.584 rows=1 loops=1)

  • Group Key: persons.person_id, recipients.org_id, recipients.org_uuid, recipients.updated_by_uuid, recipients.is_externally_owned, recipients.recipient_cat, recipients.target_name, recipients.sync_external_key, recipients.uuid, languages.descrion, tz.name, web_creds.name, phone_creds.name, sites.site_id, person_sups.sup_id
3. 0.059 0.562 ↑ 1.0 1 1

Sort (cost=16.47..16.47 rows=1 width=1,109) (actual time=0.558..0.562 rows=1 loops=1)

  • Sort Key: persons.person_id, recipients.org_uuid, recipients.updated_by_uuid, recipients.is_externally_owned, recipients.recipient_cat, recipients.target_name, recipients.sync_external_key, recipients.uuid, languages.descrion, tz.name, web_creds.name, phone_creds.name, sites.site_id, person_sups.sup_id
  • Sort Method: quicksort Memory: 25kB
4. 0.003 0.503 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.69..16.46 rows=1 width=1,109) (actual time=0.496..0.503 rows=1 loops=1)

5. 0.003 0.484 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.54..16.29 rows=1 width=945) (actual time=0.478..0.484 rows=1 loops=1)

6. 0.002 0.444 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.26..15.68 rows=1 width=937) (actual time=0.439..0.444 rows=1 loops=1)

7. 0.003 0.431 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.12..15.52 rows=1 width=856) (actual time=0.426..0.431 rows=1 loops=1)

8. 0.002 0.418 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.99..15.36 rows=1 width=850) (actual time=0.414..0.418 rows=1 loops=1)

9. 0.003 0.383 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.71..14.85 rows=1 width=820) (actual time=0.378..0.383 rows=1 loops=1)

10. 0.002 0.342 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.44..14.53 rows=1 width=813) (actual time=0.338..0.342 rows=1 loops=1)

11. 0.002 0.309 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.16..14.24 rows=1 width=813) (actual time=0.305..0.309 rows=1 loops=1)

12. 0.002 0.276 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.02..13.83 rows=1 width=818) (actual time=0.272..0.276 rows=1 loops=1)

13. 0.003 0.250 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.88..13.67 rows=1 width=818) (actual time=0.247..0.250 rows=1 loops=1)

14. 0.004 0.210 ↑ 1.0 1 1

Nested Loop (cost=8.60..13.14 rows=1 width=810) (actual time=0.207..0.210 rows=1 loops=1)

15. 0.018 0.162 ↑ 1.0 1 1

Bitmap Heap Scan on recipients (cost=8.19..9.72 rows=1 width=640) (actual time=0.160..0.162 rows=1 loops=1)

  • Recheck Cond: ((((uuid)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text) AND (deleted_id = '-1'::integer)) OR (((target_name_lower)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text) AND (deleted_id = '-1'::integer)) OR (((uuid)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text) AND (deleted_id = '-1'::integer)) OR (((target_name_lower)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text) AND (deleted_id = '-1'::integer)))
  • Filter: (org_id = '200006'::bigint)
  • Heap Blocks: exact=1
16. 0.003 0.144 ↓ 0.0 0 1

BitmapOr (cost=8.19..8.19 rows=1 width=0) (actual time=0.143..0.144 rows=0 loops=1)

17. 0.087 0.087 ↑ 1.0 1 1

Bitmap Index Scan on recipients_uuid_puidx (cost=0.00..2.05 rows=1 width=0) (actual time=0.087..0.087 rows=1 loops=1)

  • Index Cond: ((uuid)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text)
18. 0.042 0.042 ↓ 0.0 0 1

Bitmap Index Scan on idx_recipients_stnl (cost=0.00..2.05 rows=1 width=0) (actual time=0.042..0.042 rows=0 loops=1)

  • Index Cond: ((target_name_lower)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text)
19. 0.007 0.007 ↑ 1.0 1 1

Bitmap Index Scan on recipients_uuid_puidx (cost=0.00..2.05 rows=1 width=0) (actual time=0.006..0.007 rows=1 loops=1)

  • Index Cond: ((uuid)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text)
20. 0.005 0.005 ↓ 0.0 0 1

Bitmap Index Scan on idx_recipients_stnl (cost=0.00..2.05 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((target_name_lower)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text)
21. 0.044 0.044 ↑ 1.0 1 1

Index Scan using idx_persons_person_id_not_deleted on persons (cost=0.41..3.42 rows=1 width=178) (actual time=0.043..0.044 rows=1 loops=1)

  • Index Cond: (person_id = recipients.recipient_id)
22. 0.037 0.037 ↑ 1.0 1 1

Index Scan using idx_person_sups1 on person_sups (cost=0.29..0.53 rows=1 width=16) (actual time=0.037..0.037 rows=1 loops=1)

  • Index Cond: (person_id = persons.person_id)
  • Filter: (sup_id = '21380710'::bigint)
23. 0.024 0.024 ↑ 1.0 1 1

Index Scan using org_languages_pk on org_languages (cost=0.14..0.16 rows=1 width=16) (actual time=0.024..0.024 rows=1 loops=1)

  • Index Cond: (org_language_id = persons.org_language_id)
24. 0.031 0.031 ↑ 1.0 1 1

Index Scan using languages_pk on languages (cost=0.14..0.39 rows=1 width=11) (actual time=0.031..0.031 rows=1 loops=1)

  • Index Cond: (language_id = org_languages.language_id)
25. 0.031 0.031 ↑ 1.0 1 1

Index Scan using org_tz_pk on org_tz (cost=0.28..0.30 rows=1 width=16) (actual time=0.031..0.031 rows=1 loops=1)

  • Index Cond: (org_tz_id = persons.org_tz_id)
26. 0.038 0.038 ↑ 1.0 1 1

Index Scan using tz_pk on tz (cost=0.27..0.32 rows=1 width=23) (actual time=0.038..0.038 rows=1 loops=1)

  • Index Cond: (tz_id = org_tz.tz_id)
27. 0.033 0.033 ↑ 1.0 1 1

Index Scan using web_creds_pk on web_creds (cost=0.29..0.51 rows=1 width=38) (actual time=0.033..0.033 rows=1 loops=1)

  • Index Cond: (web_cred_id = persons.person_id)
28. 0.010 0.010 ↓ 0.0 0 1

Index Scan using phone_creds_pk on phone_creds (cost=0.13..0.15 rows=1 width=14) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (phone_cred_id = persons.person_id)
29. 0.011 0.011 ↑ 1.0 1 1

Index Scan using sites_pk on sites (cost=0.14..0.15 rows=1 width=89) (actual time=0.011..0.011 rows=1 loops=1)

  • Index Cond: (site_id = persons.site_id)
30. 0.037 0.037 ↑ 1.0 1 1

Index Scan using idx_persons_func1 on persons_func (cost=0.29..0.60 rows=1 width=16) (actual time=0.036..0.037 rows=1 loops=1)

  • Index Cond: (person_id = persons.person_id)
31. 0.016 0.016 ↑ 1.0 1 1

Index Scan using role_pk on role (cost=0.15..0.17 rows=1 width=172) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (role_id = persons_func.func_id)
Planning time : 12.391 ms
Execution time : 1.190 ms