explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C8Tx

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.043 25.460 ↑ 1.0 1 1

Sort (cost=12.44..12.44 rows=1 width=970) (actual time=25.449..25.460 rows=1 loops=1)

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

GroupAggregate (cost=12.36..12.43 rows=1 width=970) (actual time=25.406..25.417 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.060 25.378 ↑ 1.0 1 1

Sort (cost=12.36..12.36 rows=1 width=1,109) (actual time=25.367..25.378 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.008 25.318 ↑ 1.0 1 1

Nested Loop Left Join (cost=6.59..12.35 rows=1 width=1,109) (actual time=25.299..25.318 rows=1 loops=1)

5. 0.006 25.288 ↑ 1.0 1 1

Nested Loop Left Join (cost=6.45..12.18 rows=1 width=945) (actual time=25.270..25.288 rows=1 loops=1)

6. 0.007 25.223 ↑ 1.0 1 1

Nested Loop Left Join (cost=6.16..11.57 rows=1 width=937) (actual time=25.206..25.223 rows=1 loops=1)

7. 0.006 25.203 ↑ 1.0 1 1

Nested Loop Left Join (cost=6.03..11.42 rows=1 width=856) (actual time=25.188..25.203 rows=1 loops=1)

8. 0.004 25.180 ↑ 1.0 1 1

Nested Loop Left Join (cost=5.90..11.26 rows=1 width=850) (actual time=25.166..25.180 rows=1 loops=1)

9. 0.006 25.084 ↑ 1.0 1 1

Nested Loop Left Join (cost=5.61..10.75 rows=1 width=820) (actual time=25.070..25.084 rows=1 loops=1)

10. 0.006 25.025 ↑ 1.0 1 1

Nested Loop Left Join (cost=5.34..10.43 rows=1 width=813) (actual time=25.013..25.025 rows=1 loops=1)

11. 0.005 24.976 ↑ 1.0 1 1

Nested Loop Left Join (cost=5.07..10.13 rows=1 width=813) (actual time=24.965..24.976 rows=1 loops=1)

12. 0.006 24.934 ↑ 1.0 1 1

Nested Loop Left Join (cost=4.93..9.73 rows=1 width=818) (actual time=24.924..24.934 rows=1 loops=1)

13. 0.010 24.892 ↑ 1.0 1 1

Nested Loop Left Join (cost=4.79..9.57 rows=1 width=818) (actual time=24.883..24.892 rows=1 loops=1)

14. 0.012 24.764 ↑ 1.0 1 1

Nested Loop (cost=4.50..9.04 rows=1 width=810) (actual time=24.756..24.764 rows=1 loops=1)

15. 0.024 5.797 ↑ 1.0 1 1

Bitmap Heap Scan on recipients (cost=4.10..5.62 rows=1 width=640) (actual time=5.791..5.797 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)))
  • Filter: (org_id = '200006'::bigint)
  • Heap Blocks: exact=1
16. 0.006 5.773 ↓ 0.0 0 1

BitmapOr (cost=4.10..4.10 rows=1 width=0) (actual time=5.771..5.773 rows=0 loops=1)

17. 5.701 5.701 ↑ 1.0 1 1

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

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

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

  • Index Cond: ((target_name_lower)::text = '00a980ae-1444-4de9-ac74-278b8ed51107'::text)
19. 18.955 18.955 ↑ 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=18.955..18.955 rows=1 loops=1)

  • Index Cond: (person_id = recipients.recipient_id)
20. 0.118 0.118 ↑ 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.118..0.118 rows=1 loops=1)

  • Index Cond: (person_id = persons.person_id)
  • Filter: (sup_id = '21380710'::bigint)
21. 0.036 0.036 ↑ 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.035..0.036 rows=1 loops=1)

  • Index Cond: (org_language_id = persons.org_language_id)
22. 0.037 0.037 ↑ 1.0 1 1

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

  • Index Cond: (language_id = org_languages.language_id)
23. 0.043 0.043 ↑ 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.043..0.043 rows=1 loops=1)

  • Index Cond: (org_tz_id = persons.org_tz_id)
24. 0.053 0.053 ↑ 1.0 1 1

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

  • Index Cond: (tz_id = org_tz.tz_id)
25. 0.092 0.092 ↑ 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.092..0.092 rows=1 loops=1)

  • Index Cond: (web_cred_id = persons.person_id)
26. 0.017 0.017 ↓ 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.017..0.017 rows=0 loops=1)

  • Index Cond: (phone_cred_id = persons.person_id)
27. 0.013 0.013 ↑ 1.0 1 1

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

  • Index Cond: (site_id = persons.site_id)
28. 0.059 0.059 ↑ 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.058..0.059 rows=1 loops=1)

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

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

  • Index Cond: (role_id = persons_func.func_id)
Planning time : 12.606 ms
Execution time : 26.121 ms