explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hW3j

Settings
# exclusive inclusive rows x rows loops node
1. 45.866 849.988 ↓ 0.0 0 1

Gather Merge (cost=141,805.50..141,821.12 rows=132 width=1,709) (actual time=820.305..849.988 rows=0 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
2. 0.037 804.122 ↓ 0.0 0 4 / 4

Sort (cost=140,805.46..140,805.57 rows=44 width=1,709) (actual time=804.122..804.122 rows=0 loops=4)

  • Sort Key: dvc.sequence
  • Sort Method: quicksort Memory: 25kB
3. 0.001 804.085 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,647.14..140,804.26 rows=44 width=1,709) (actual time=804.085..804.085 rows=0 loops=4)

4. 0.000 804.084 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,646.72..140,779.60 rows=44 width=1,983) (actual time=804.084..804.084 rows=0 loops=4)

5. 0.001 804.084 ↓ 0.0 0 4 / 4

Hash Left Join (cost=140,646.58..140,769.15 rows=44 width=1,992) (actual time=804.084..804.084 rows=0 loops=4)

  • Hash Cond: ((numpage.country_code)::text = (numpage_c.country_code)::text)
6. 0.000 804.083 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,636.00..140,758.46 rows=44 width=2,001) (actual time=804.083..804.083 rows=0 loops=4)

7. 0.001 804.083 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,635.85..140,751.31 rows=44 width=1,998) (actual time=804.083..804.083 rows=0 loops=4)

8. 0.000 804.082 ↓ 0.0 0 4 / 4

Hash Left Join (cost=140,635.71..140,744.16 rows=44 width=1,995) (actual time=804.082..804.082 rows=0 loops=4)

  • Hash Cond: (dvc.dvc_id = txtpage.dvc_id)
  • Join Filter: ((dvc.dvc_type)::text = 'TEXT_PAGER'::text)
9. 0.001 804.082 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,634.50..140,742.84 rows=44 width=1,984) (actual time=804.081..804.082 rows=0 loops=4)

10. 0.001 804.081 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,634.23..140,729.84 rows=44 width=1,801) (actual time=804.081..804.081 rows=0 loops=4)

  • Join Filter: ((dvc.dvc_type)::text = 'VOICE_IVR'::text)
11. 0.000 804.080 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,634.08..140,722.14 rows=44 width=1,635) (actual time=804.080..804.080 rows=0 loops=4)

12. 0.001 804.080 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,633.94..140,714.99 rows=44 width=1,417) (actual time=804.080..804.080 rows=0 loops=4)

  • Join Filter: ((dvc.dvc_type)::text = 'IM'::text)
13. 0.001 804.079 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,633.79..140,707.29 rows=44 width=1,199) (actual time=804.079..804.079 rows=0 loops=4)

  • Join Filter: ((dvc.dvc_type)::text = 'APPLE_PUSH'::text)
14. 0.000 804.078 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,633.51..140,693.63 rows=44 width=1,073) (actual time=804.078..804.078 rows=0 loops=4)

  • Join Filter: ((dvc.dvc_type)::text = 'EMAIL'::text)
15. 0.001 804.078 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,633.08..140,668.37 rows=44 width=1,048) (actual time=804.078..804.078 rows=0 loops=4)

  • Join Filter: ((dvc.dvc_type)::text = 'TEXT_PHONE'::text)
16. 0.001 804.077 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,632.66..140,645.74 rows=44 width=1,033) (actual time=804.077..804.077 rows=0 loops=4)

  • Join Filter: ((dvc.dvc_type)::text = 'FAX'::text)
17. 0.002 804.076 ↓ 0.0 0 4 / 4

Merge Left Join (cost=140,632.40..140,632.98 rows=44 width=1,020) (actual time=804.076..804.076 rows=0 loops=4)

  • Merge Cond: (dvc.dvc_id = numpage.dvc_id)
  • Join Filter: ((dvc.dvc_type)::text = 'NUMERIC_PAGER'::text)
18. 0.010 804.074 ↓ 0.0 0 4 / 4

Sort (cost=140,619.55..140,619.66 rows=44 width=354) (actual time=804.074..804.074 rows=0 loops=4)

  • Sort Key: dvc.dvc_id
  • Sort Method: quicksort Memory: 25kB
19. 0.001 804.064 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=73.89..140,618.35 rows=44 width=354) (actual time=804.064..804.064 rows=0 loops=4)

  • Join Filter: ((dvc.dvc_type)::text = 'VOICE'::text)
20. 0.001 804.063 ↓ 0.0 0 4 / 4

Nested Loop (cost=73.46..140,590.90 rows=44 width=335) (actual time=804.063..804.063 rows=0 loops=4)

21. 0.000 804.062 ↓ 0.0 0 4 / 4

Nested Loop (cost=73.31..140,583.75 rows=44 width=337) (actual time=804.062..804.062 rows=0 loops=4)

22. 0.001 804.062 ↓ 0.0 0 4 / 4

Nested Loop (cost=72.90..140,550.31 rows=44 width=337) (actual time=804.062..804.062 rows=0 loops=4)

23. 0.992 804.061 ↓ 0.0 0 4 / 4

Hash Join (cost=72.62..140,537.44 rows=44 width=315) (actual time=804.061..804.061 rows=0 loops=4)

  • Hash Cond: (rd.org_dvc_name_id = odn.org_dvc_name_id)
  • Join Filter: (((rd.uuid)::text = 'd20ad205-108f-4e3c-badb-a8e032daed44'::text) OR ((((rd.target_name_lower)::text || '|'::text) || (odn.name_lower)::text) = 'd20ad205-108f-4e3c-badb-a8e032daed44'::text))
  • Rows Removed by Join Filter: 1879
24. 1.055 802.314 ↑ 4.6 1,879 4 / 4

Merge Join (cost=1.99..140,443.89 rows=8,732 width=317) (actual time=95.665..802.314 rows=1,879 loops=4)

  • Merge Cond: (persons.site_id = sites.site_id)
25. 1.223 796.438 ↑ 4.6 1,879 4 / 4

Nested Loop (cost=1.71..328,093.34 rows=8,732 width=317) (actual time=95.405..796.438 rows=1,879 loops=4)

26. 0.422 789.577 ↑ 15.1 1,879 4 / 4

Nested Loop (cost=1.28..304,724.93 rows=28,435 width=202) (actual time=95.385..789.577 rows=1,879 loops=4)

27. 15.541 783.963 ↑ 80.2 472 4 / 4

Nested Loop (cost=0.85..237,561.51 rows=37,835 width=87) (actual time=95.338..783.963 rows=472 loops=4)

28. 150.092 150.092 ↑ 1.3 206,110 4 / 4

Parallel Index Scan using idx_persons4 on persons (cost=0.42..43,232.86 rows=265,948 width=30) (actual time=0.025..150.092 rows=206,110 loops=4)

29. 618.330 618.330 ↓ 0.0 0 824,440 / 4

Index Scan using recipients_recipient_id_not_deleted_idx on recipients rp (cost=0.43..0.73 rows=1 width=57) (actual time=0.003..0.003 rows=0 loops=824,440)

  • Index Cond: (recipient_id = persons.person_id)
  • Filter: (org_id = 200029)
  • Rows Removed by Filter: 0
30. 5.192 5.192 ↑ 6.0 4 1,888 / 4

Index Scan using idx_dvc_person_id_not_deleted on dvc (cost=0.43..1.54 rows=24 width=123) (actual time=0.006..0.011 rows=4 loops=1,888)

  • Index Cond: (person_id = rp.recipient_id)
  • Filter: (org_uuid = 'a7d08606-2fa6-4830-b14c-f5c5a59b1472'::uuid)
31. 5.638 5.638 ↑ 1.0 1 7,517 / 4

Index Scan using recipients_recipient_id_not_deleted_idx on recipients rd (cost=0.43..0.82 rows=1 width=115) (actual time=0.003..0.003 rows=1 loops=7,517)

  • Index Cond: (recipient_id = dvc.dvc_id)
32. 4.821 4.821 ↑ 1.4 9,061 4 / 4

Index Scan using sites_pk on sites (cost=0.29..965.38 rows=13,120 width=16) (actual time=0.037..4.821 rows=9,061 loops=4)

33. 0.295 0.755 ↑ 1.0 1,539 4 / 4

Hash (cost=51.39..51.39 rows=1,539 width=28) (actual time=0.754..0.755 rows=1,539 loops=4)

  • Buckets: 2048 Batches: 1 Memory Usage: 113kB
34. 0.460 0.460 ↑ 1.0 1,539 4 / 4

Seq Scan on org_dvc_names odn (cost=0.00..51.39 rows=1,539 width=28) (actual time=0.026..0.460 rows=1,539 loops=4)

35. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using org_svc_provs_pk on org_svc_provs osp (cost=0.28..0.29 rows=1 width=38) (never executed)

  • Index Cond: (org_svc_prov_id = dvc.org_svc_prov_id)
36. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using addresses_pk on addresses (cost=0.42..0.76 rows=1 width=16) (never executed)

  • Index Cond: (address_id = sites.address_id)
37. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using countries_pk on countries site_c (cost=0.14..0.16 rows=1 width=14) (never executed)

  • Index Cond: (country_id = addresses.country_id)
38. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using voc_dvc_dtl_pk on voc_dvc_dtl voc (cost=0.43..0.61 rows=1 width=27) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
39. 0.000 0.000 ↓ 0.0 0 / 4

Sort (cost=12.85..13.02 rows=70 width=674) (never executed)

  • Sort Key: numpage.dvc_id
40. 0.000 0.000 ↓ 0.0 0 / 4

Seq Scan on num_page_dvc_dtl numpage (cost=0.00..10.70 rows=70 width=674) (never executed)

41. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using fax_dvc_dtl_pk on fax_dvc_dtl fax (cost=0.26..0.28 rows=1 width=21) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
42. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using txt_phone_dvc_dtl_pk on txt_phone_dvc_dtl txtph (cost=0.42..0.50 rows=1 width=23) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
43. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using email_dvc_dtl_pk on email_dvc_dtl edd (cost=0.43..0.56 rows=1 width=33) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
44. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using apple_push_dvc_dtl_pk on apple_push_dvc_dtl push (cost=0.28..0.30 rows=1 width=134) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
45. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using im_dvc_dtl_pk on im_dvc_dtl im (cost=0.14..0.16 rows=1 width=226) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
46. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using gen_dvc_dtl_pk on gen_dvc_dtl gen (cost=0.14..0.16 rows=1 width=226) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
47. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using voice_ivr_dvc_dtl_pk on voice_ivr_dvc_dtl voiceivr (cost=0.14..0.16 rows=1 width=174) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
48. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using gcm_push_dvc_dtl_pk on gcm_push_dvc_dtl gcm (cost=0.28..0.30 rows=1 width=191) (never executed)

  • Index Cond: (dvc.dvc_id = dvc_id)
49. 0.000 0.000 ↓ 0.0 0 / 4

Hash (cost=1.09..1.09 rows=9 width=19) (never executed)

50. 0.000 0.000 ↓ 0.0 0 / 4

Seq Scan on txt_page_dvc_dtl txtpage (cost=0.00..1.09 rows=9 width=19) (never executed)

51. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using country_code_uc on countries voc_c (cost=0.14..0.16 rows=1 width=6) (never executed)

  • Index Cond: ((voc.country_code)::text = (country_code)::text)
52. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using country_code_uc on countries txtph_c (cost=0.14..0.16 rows=1 width=6) (never executed)

  • Index Cond: ((txtph.country_code)::text = (country_code)::text)
53. 0.000 0.000 ↓ 0.0 0 / 4

Hash (cost=7.48..7.48 rows=248 width=6) (never executed)

54. 0.000 0.000 ↓ 0.0 0 / 4

Seq Scan on countries numpage_c (cost=0.00..7.48 rows=248 width=6) (never executed)

55. 0.000 0.000 ↓ 0.0 0 / 4

Index Scan using country_code_uc on countries voiceivr_c (cost=0.14..0.24 rows=1 width=6) (never executed)

  • Index Cond: ((voiceivr.country_code)::text = (country_code)::text)
56. 0.000 0.000 ↓ 0.0 0 / 4

Index Only Scan using person_sups_pk on person_sups (cost=0.42..0.45 rows=1 width=16) (never executed)

  • Index Cond: ((person_id = rp.recipient_id) AND (sup_id = 7731412))
  • Heap Fetches: 0
Planning time : 27.072 ms
Execution time : 851.339 ms