explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m1tn

Settings
# exclusive inclusive rows x rows loops node
1. 11.304 4,329.330 ↑ 3.5 4,251 1

Nested Loop (cost=89.51..9,516,980.50 rows=14,899 width=2,130) (actual time=1.844..4,329.330 rows=4,251 loops=1)

2. 8.747 8.747 ↓ 1.0 14,911 1

Seq Scan on recipients rplj (cost=0.00..683.29 rows=14,899 width=37) (actual time=0.015..8.747 rows=14,911 loops=1)

  • Filter: (org_id = 1)
  • Rows Removed by Filter: 4
3. 0.000 4,309.279 ↓ 0.0 0 14,911

Limit (cost=89.51..638.70 rows=1 width=2,130) (actual time=0.091..0.289 rows=0 loops=14,911)

4. 48.672 4,309.279 ↓ 0.0 0 14,911

Nested Loop Semi Join (cost=89.51..638.70 rows=1 width=2,130) (actual time=0.091..0.289 rows=0 loops=14,911)

5. 14.911 506.974 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=4.40..12.82 rows=1 width=2,441) (actual time=0.019..0.034 rows=0 loops=14,911)

6. 0.000 492.063 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=4.25..12.59 rows=1 width=2,450) (actual time=0.018..0.033 rows=0 loops=14,911)

7. 10.660 492.063 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=4.11..12.30 rows=1 width=2,459) (actual time=0.018..0.033 rows=0 loops=14,911)

8. 10.660 477.152 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=3.97..12.13 rows=1 width=2,456) (actual time=0.018..0.032 rows=0 loops=14,911)

9. 10.660 462.241 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=3.82..11.97 rows=1 width=2,453) (actual time=0.017..0.031 rows=0 loops=14,911)

10. 10.660 447.330 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=3.68..11.80 rows=1 width=2,265) (actual time=0.017..0.030 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'VOICE_IVR'::text)
11. 10.660 432.419 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=3.53..11.62 rows=1 width=2,099) (actual time=0.016..0.029 rows=0 loops=14,911)

12. 10.660 417.508 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=3.39..11.45 rows=1 width=1,881) (actual time=0.016..0.028 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'TEXT_PAGER'::text)
13. 0.000 402.597 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=3.24..11.28 rows=1 width=1,655) (actual time=0.015..0.027 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'IM'::text)
14. 10.660 402.597 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=3.10..11.10 rows=1 width=1,437) (actual time=0.015..0.027 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'APPLE_PUSH'::text)
15. 17.069 387.686 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=2.95..10.92 rows=1 width=1,319) (actual time=0.015..0.026 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'EMAIL'::text)
16. 10.660 357.864 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=2.67..10.59 rows=1 width=1,298) (actual time=0.014..0.024 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'NUMERIC_PAGER'::text)
17. 2.158 342.953 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=2.53..10.41 rows=1 width=632) (actual time=0.014..0.023 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'TEXT_PHONE'::text)
18. 10.660 328.042 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=2.25..10.09 rows=1 width=617) (actual time=0.013..0.022 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'FAX'::text)
19. 12.818 313.131 ↓ 0.0 0 14,911

Nested Loop Left Join (cost=2.10..9.91 rows=1 width=387) (actual time=0.013..0.021 rows=0 loops=14,911)

  • Join Filter: ((dvc.dvc_type)::text = 'VOICE'::text)
20. 6.409 283.309 ↓ 0.0 0 14,911

Nested Loop (cost=1.82..9.57 rows=1 width=335) (actual time=0.012..0.019 rows=0 loops=14,911)

21. 6.409 268.398 ↓ 0.0 0 14,911

Nested Loop (cost=1.68..8.53 rows=1 width=337) (actual time=0.011..0.018 rows=0 loops=14,911)

22. 6.409 253.487 ↓ 0.0 0 14,911

Nested Loop (cost=1.54..7.94 rows=1 width=337) (actual time=0.011..0.017 rows=0 loops=14,911)

23. 12.818 238.576 ↓ 0.0 0 14,911

Nested Loop (cost=1.41..7.78 rows=1 width=337) (actual time=0.010..0.016 rows=0 loops=14,911)

  • Join Filter: (rp.recipient_id = persons.person_id)
24. 6.409 208.754 ↓ 0.0 0 14,911

Nested Loop (cost=1.13..7.44 rows=1 width=324) (actual time=0.010..0.014 rows=0 loops=14,911)

25. 21.320 193.843 ↓ 0.0 0 14,911

Nested Loop (cost=0.99..7.28 rows=1 width=309) (actual time=0.009..0.013 rows=0 loops=14,911)

26. 0.065 164.021 ↓ 0.0 0 14,911

Nested Loop (cost=0.85..7.12 rows=1 width=299) (actual time=0.009..0.011 rows=0 loops=14,911)

27. 15.557 134.199 ↓ 0.0 0 14,911

Nested Loop (cost=0.56..6.61 rows=1 width=178) (actual time=0.008..0.009 rows=0 loops=14,911)

28. 89.466 89.466 ↓ 0.0 0 14,911

Index Scan using recipients_uuid_puidx on recipients rp (cost=0.28..3.30 rows=1 width=55) (actual time=0.006..0.006 rows=0 loops=14,911)

  • Index Cond: ((uuid)::text = (rplj.uuid)::text)
  • Filter: (org_id = 1)
29. 29.176 29.176 ↑ 1.0 1 7,294

Index Scan using idx_dvc_person_id_not_deleted on dvc (cost=0.28..3.30 rows=1 width=123) (actual time=0.002..0.004 rows=1 loops=7,294)

  • Index Cond: (person_id = rp.recipient_id)
30. 29.757 29.757 ↑ 1.0 1 4,251

Index Scan using recipients_pk on recipients rd (cost=0.29..0.51 rows=1 width=121) (actual time=0.007..0.007 rows=1 loops=4,251)

  • Index Cond: (recipient_id = dvc.dvc_id)
  • Filter: (deleted_id = '-1'::integer)
31. 8.502 8.502 ↑ 1.0 1 4,251

Index Scan using org_dvc_names_pk on org_dvc_names odn (cost=0.14..0.16 rows=1 width=18) (actual time=0.002..0.002 rows=1 loops=4,251)

  • Index Cond: (org_dvc_name_id = rd.org_dvc_name_id)
32. 8.502 8.502 ↑ 1.0 1 4,251

Index Scan using org_svc_provs_pk on org_svc_provs osp (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=4,251)

  • Index Cond: (org_svc_prov_id = dvc.org_svc_prov_id)
33. 17.004 17.004 ↑ 1.0 1 4,251

Index Scan using persons_pk on persons (cost=0.28..0.33 rows=1 width=29) (actual time=0.004..0.004 rows=1 loops=4,251)

  • Index Cond: (person_id = dvc.person_id)
34. 8.502 8.502 ↑ 1.0 1 4,251

Index Scan using sites_pk on sites (cost=0.14..0.15 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=4,251)

  • Index Cond: (site_id = persons.site_id)
35. 8.502 8.502 ↑ 1.0 1 4,251

Index Scan using addresses_pk on addresses (cost=0.14..0.53 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=4,251)

  • Index Cond: (address_id = sites.address_id)
36. 8.502 8.502 ↑ 1.0 1 4,251

Index Scan using countries_pk on countries site_c (cost=0.14..1.04 rows=1 width=14) (actual time=0.002..0.002 rows=1 loops=4,251)

  • Index Cond: (country_id = addresses.country_id)
37. 17.004 17.004 ↓ 0.0 0 4,251

Index Scan using voc_dvc_dtl_pk on voc_dvc_dtl voc (cost=0.28..0.32 rows=1 width=60) (actual time=0.004..0.004 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
38. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using fax_dvc_dtl_pk on fax_dvc_dtl fax (cost=0.14..0.17 rows=1 width=238) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
39. 12.753 12.753 ↓ 0.0 0 4,251

Index Scan using txt_phone_dvc_dtl_pk on txt_phone_dvc_dtl txtph (cost=0.28..0.31 rows=1 width=23) (actual time=0.003..0.003 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
40. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using num_page_dvc_dtl_pk on num_page_dvc_dtl numpage (cost=0.14..0.16 rows=1 width=674) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
41. 12.753 12.753 ↓ 0.0 0 4,251

Index Scan using email_dvc_dtl_pk on email_dvc_dtl edd (cost=0.28..0.32 rows=1 width=29) (actual time=0.003..0.003 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
42. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using apple_push_dvc_dtl_pk on apple_push_dvc_dtl push (cost=0.14..0.16 rows=1 width=126) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
43. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using im_dvc_dtl_pk on im_dvc_dtl im (cost=0.14..0.17 rows=1 width=226) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
44. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using txt_page_dvc_dtl_pk on txt_page_dvc_dtl txtpage (cost=0.14..0.17 rows=1 width=234) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
45. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using gen_dvc_dtl_pk on gen_dvc_dtl gen (cost=0.14..0.17 rows=1 width=226) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
46. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using voice_ivr_dvc_dtl_pk on voice_ivr_dvc_dtl voiceivr (cost=0.14..0.17 rows=1 width=174) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
47. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using gcm_push_dvc_dtl_pk on gcm_push_dvc_dtl gcm (cost=0.14..0.17 rows=1 width=196) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: (dvc.dvc_id = dvc_id)
48. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using country_code_uc on countries voc_c (cost=0.14..0.17 rows=1 width=6) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: ((voc.country_code)::text = (country_code)::text)
49. 4.251 4.251 ↓ 0.0 0 4,251

Index Scan using country_code_uc on countries txtph_c (cost=0.14..0.17 rows=1 width=6) (actual time=0.001..0.001 rows=0 loops=4,251)

  • Index Cond: ((txtph.country_code)::text = (country_code)::text)
50. 0.000 0.000 ↓ 0.0 0 4,251

Index Scan using country_code_uc on countries numpage_c (cost=0.14..0.29 rows=1 width=6) (actual time=0.000..0.000 rows=0 loops=4,251)

  • Index Cond: ((numpage.country_code)::text = (country_code)::text)
51. 0.000 0.000 ↓ 0.0 0 4,251

Index Scan using country_code_uc on countries voiceivr_c (cost=0.14..0.22 rows=1 width=6) (actual time=0.000..0.000 rows=0 loops=4,251)

  • Index Cond: ((voiceivr.country_code)::text = (country_code)::text)
52. 2,474.082 3,753.633 ↑ 1.0 1 4,251

Bitmap Heap Scan on recipients (cost=85.11..625.76 rows=1 width=37) (actual time=0.883..0.883 rows=1 loops=4,251)

  • Recheck Cond: ((recipient_cat)::text = 'PERSON'::text)
  • Filter: ((uuid)::text = (rplj.uuid)::text)
  • Rows Removed by Filter: 1435
  • Heap Blocks: exact=966807
53. 1,279.551 1,279.551 ↓ 1.2 3,498 4,251

Bitmap Index Scan on idx_recipients_recipient_cat (cost=0.00..85.11 rows=2,910 width=0) (actual time=0.301..0.301 rows=3,498 loops=4,251)

  • Index Cond: ((recipient_cat)::text = 'PERSON'::text)
Planning time : 82.100 ms
Execution time : 4,331.905 ms