explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RpFk

Settings
# exclusive inclusive rows x rows loops node
1. 43.870 536.243 ↓ 0.0 0 1

Gather Merge (cost=87,026.13..87,032.52 rows=54 width=1,709) (actual time=509.399..536.243 rows=0 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
2. 0.034 492.373 ↓ 0.0 0 4 / 4

Sort (cost=86,026.09..86,026.13 rows=18 width=1,709) (actual time=492.373..492.373 rows=0 loops=4)

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

Nested Loop Left Join (cost=85,957.54..86,025.71 rows=18 width=1,709) (actual time=492.339..492.339 rows=0 loops=4)

4. 0.000 492.338 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=85,957.12..86,015.63 rows=18 width=1,983) (actual time=492.338..492.338 rows=0 loops=4)

5. 0.001 492.338 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=85,956.97..86,011.35 rows=18 width=1,992) (actual time=492.338..492.338 rows=0 loops=4)

6. 0.001 492.337 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=85,956.83..86,005.72 rows=18 width=2,001) (actual time=492.337..492.337 rows=0 loops=4)

7. 0.000 492.336 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=85,956.68..86,002.80 rows=18 width=1,998) (actual time=492.336..492.336 rows=0 loops=4)

8. 0.001 492.336 ↓ 0.0 0 4 / 4

Hash Left Join (cost=85,956.54..85,999.87 rows=18 width=1,995) (actual time=492.336..492.336 rows=0 loops=4)

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

Nested Loop Left Join (cost=85,955.33..85,998.62 rows=18 width=1,984) (actual time=492.335..492.335 rows=0 loops=4)

10. 0.001 492.335 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=85,955.06..85,993.31 rows=18 width=1,801) (actual time=492.335..492.335 rows=0 loops=4)

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

Nested Loop Left Join (cost=85,954.91..85,990.16 rows=18 width=1,635) (actual time=492.334..492.334 rows=0 loops=4)

12. 0.001 492.334 ↓ 0.0 0 4 / 4

Nested Loop Left Join (cost=85,954.77..85,987.23 rows=18 width=1,417) (actual time=492.334..492.334 rows=0 loops=4)

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

Nested Loop Left Join (cost=85,954.62..85,984.08 rows=18 width=1,199) (actual time=492.333..492.333 rows=0 loops=4)

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

Nested Loop Left Join (cost=85,954.34..85,978.49 rows=18 width=1,073) (actual time=492.332..492.332 rows=0 loops=4)

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

Nested Loop Left Join (cost=85,953.91..85,968.16 rows=18 width=1,048) (actual time=492.331..492.331 rows=0 loops=4)

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

Nested Loop Left Join (cost=85,953.49..85,958.90 rows=18 width=1,033) (actual time=492.331..492.331 rows=0 loops=4)

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

Merge Left Join (cost=85,953.23..85,953.68 rows=18 width=1,020) (actual time=492.330..492.330 rows=0 loops=4)

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

Sort (cost=85,940.38..85,940.43 rows=18 width=354) (actual time=492.328..492.328 rows=0 loops=4)

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

Nested Loop Left Join (cost=73.88..85,940.01 rows=18 width=354) (actual time=492.319..492.319 rows=0 loops=4)

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

Nested Loop (cost=73.46..85,928.78 rows=18 width=335) (actual time=492.318..492.318 rows=0 loops=4)

21. 0.000 492.317 ↓ 0.0 0 4 / 4

Nested Loop (cost=73.31..85,925.85 rows=18 width=337) (actual time=492.317..492.317 rows=0 loops=4)

22. 0.001 492.317 ↓ 0.0 0 4 / 4

Nested Loop (cost=72.89..85,912.17 rows=18 width=337) (actual time=492.317..492.317 rows=0 loops=4)

23. 1.020 492.316 ↓ 0.0 0 4 / 4

Hash Join (cost=72.62..85,906.91 rows=18 width=315) (actual time=492.316..492.316 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.256 490.514 ↑ 2.0 1,879 4 / 4

Merge Join (cost=1.99..85,826.54 rows=3,710 width=317) (actual time=97.523..490.514 rows=1,879 loops=4)

  • Merge Cond: (persons.site_id = sites.site_id)
25. 1.230 482.459 ↑ 2.0 1,879 4 / 4

Nested Loop (cost=1.70..199,642.41 rows=3,710 width=317) (actual time=97.287..482.459 rows=1,879 loops=4)

26. 0.594 475.591 ↑ 6.4 1,879 4 / 4

Nested Loop (cost=1.28..189,712.35 rows=12,083 width=202) (actual time=97.266..475.591 rows=1,879 loops=4)

27. 14.412 469.805 ↑ 34.1 472 4 / 4

Nested Loop (cost=0.85..161,173.00 rows=16,077 width=87) (actual time=97.213..469.805 rows=472 loops=4)

28. 105.147 105.147 ↑ 1.3 87,562 4 / 4

Parallel Index Scan using idx_persons4 on persons (cost=0.42..35,283.82 rows=113,010 width=30) (actual time=0.035..105.147 rows=87,562 loops=4)

29. 350.246 350.246 ↓ 0.0 0 350,246 / 4

Index Scan using recipients_recipient_id_not_deleted_idx on recipients rp (cost=0.43..1.11 rows=1 width=57) (actual time=0.004..0.004 rows=0 loops=350,246)

  • Index Cond: (recipient_id = persons.person_id)
  • Filter: (org_id = 200029)
  • Rows Removed by Filter: 1
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. 6.799 6.799 ↑ 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.029..6.799 rows=11,961 loops=4)

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

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

  • Buckets: 2048 Batches: 1 Memory Usage: 113kB
34. 0.476 0.476 ↑ 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.028..0.476 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

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

  • Index Cond: ((numpage.country_code)::text = (country_code)::text)
54. 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)
55. 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 : 26.426 ms
Execution time : 537.449 ms