explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xkxq

Settings
# exclusive inclusive rows x rows loops node
1. 54.420 905.045 ↓ 0.0 0 1

Gather Merge (cost=141,813.87..141,829.49 rows=132 width=1,709) (actual time=874.773..905.045 rows=0 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
2. 0.054 850.625 ↓ 0.0 0 4 / 4

Sort (cost=140,813.83..140,813.94 rows=44 width=1,709) (actual time=850.625..850.625 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,655.51..140,812.63 rows=44 width=1,709) (actual time=850.571..850.571 rows=0 loops=4)

4. 0.001 850.571 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,655.09..140,787.97 rows=44 width=1,983) (actual time=850.571..850.571 rows=0 loops=4)

5. 0.001 850.570 ↓ 0.0 0 4 / 4

Hash Left Join (cost=140,654.94..140,777.52 rows=44 width=1,992) (actual time=850.570..850.570 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,644.36..140,766.83 rows=44 width=2,001) (actual time=850.569..850.569 rows=0 loops=4)

7. 0.000 850.568 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,644.22..140,759.68 rows=44 width=1,998) (actual time=850.568..850.568 rows=0 loops=4)

8. 0.001 850.568 ↓ 0.0 0 4 / 4

Hash Left Join (cost=140,644.07..140,752.53 rows=44 width=1,995) (actual time=850.568..850.568 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,642.87..140,751.21 rows=44 width=1,984) (actual time=850.567..850.567 rows=0 loops=4)

10. 0.000 850.566 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,642.59..140,738.21 rows=44 width=1,801) (actual time=850.566..850.566 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,642.45..140,730.51 rows=44 width=1,635) (actual time=850.566..850.566 rows=0 loops=4)

12. 0.000 850.562 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=140,642.30..140,723.36 rows=44 width=1,417) (actual time=850.562..850.562 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,642.16..140,715.66 rows=44 width=1,199) (actual time=850.562..850.562 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,641.88..140,702.00 rows=44 width=1,073) (actual time=850.561..850.561 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,641.45..140,676.74 rows=44 width=1,048) (actual time=850.560..850.560 rows=0 loops=4)

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

Nested Loop Left Join (cost=140,641.03..140,654.11 rows=44 width=1,033) (actual time=850.560..850.560 rows=0 loops=4)

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

Merge Left Join (cost=140,640.77..140,641.35 rows=44 width=1,020) (actual time=850.559..850.559 rows=0 loops=4)

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

Sort (cost=140,627.92..140,628.03 rows=44 width=354) (actual time=850.556..850.556 rows=0 loops=4)

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

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

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

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

21. 0.001 850.543 ↓ 0.0 0 4 / 4

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

22. 0.000 850.542 ↓ 0.0 0 4 / 4

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

23. 1.129 850.542 ↓ 0.0 0 4 / 4

Hash Join (cost=72.62..140,545.80 rows=44 width=315) (actual time=850.542..850.542 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: 1,879
24. 1.277 848.601 ↑ 4.6 1,879 4 / 4

Merge Join (cost=1.99..140,452.26 rows=8,729 width=317) (actual time=116.756..848.601 rows=1,879 loops=4)

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

Nested Loop (cost=1.71..328,088.81 rows=8,729 width=317) (actual time=116.484..840.414 rows=1,879 loops=4)

26. 0.494 833.110 ↑ 15.1 1,879 4 / 4

Nested Loop (cost=1.28..304,723.96 rows=28,427 width=202) (actual time=116.461..833.110 rows=1,879 loops=4)

27. 43.545 826.952 ↑ 80.2 472 4 / 4

Nested Loop (cost=0.85..237,560.54 rows=37,835 width=87) (actual time=116.412..826.952 rows=472 loops=4)

28. 165.078 165.078 ↑ 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.036..165.078 rows=206,110 loops=4)

29. 618.329 618.329 ↓ 0.0 0 824,439 / 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,439)

  • Index Cond: (recipient_id = persons.person_id)
  • Filter: (org_id = 200,029)
  • Rows Removed by Filter: 0
30. 5.664 5.664 ↑ 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.012 rows=4 loops=1,888)

  • Index Cond: (person_id = rp.recipient_id)
  • Filter: (org_uuid = 'a7d08606-2fa6-4830-b14c-f5c5a59b1472'::uuid)
31. 5.636 5.636 ↑ 1.0 1 7,515 / 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,515)

  • Index Cond: (recipient_id = dvc.dvc_id)
32. 6.910 6.910 ↑ 1.1 11,961 4 / 4

Index Scan using sites_pk on sites (cost=0.29..965.38 rows=13,120 width=16) (actual time=0.030..6.910 rows=11,961 loops=4)

33. 0.306 0.812 ↑ 1.0 1,539 4 / 4

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 113kB
34. 0.506 0.506 ↑ 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.024..0.506 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 = 7,731,412))
  • Heap Fetches: 0
Planning time : 38.194 ms
Execution time : 906.157 ms