explain.depesz.com

PostgreSQL's explain analyze made readable

Result: okAu

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 1.806 ↑ 1.0 9 1

Limit (cost=331.81..3,052.12 rows=9 width=2,761) (actual time=0.828..1.806 rows=9 loops=1)

2. 0.378 1.803 ↑ 1.0 9 1

Result (cost=331.81..3,052.12 rows=9 width=2,761) (actual time=0.827..1.803 rows=9 loops=1)

3. 0.110 0.615 ↑ 1.0 9 1

Sort (cost=331.81..331.83 rows=9 width=1,669) (actual time=0.613..0.615 rows=9 loops=1)

  • Sort Key: cpi.family_name, cpi.given_name, c.school_code
  • Sort Method: quicksort Memory: 26kB
4. 0.050 0.505 ↑ 1.0 9 1

Nested Loop Left Join (cost=64.49..331.67 rows=9 width=1,669) (actual time=0.299..0.505 rows=9 loops=1)

  • Join Filter: ((cdn8.tenant_id = c.tenant_id) AND (cdn8.community_id = c.id))
5. 0.004 0.446 ↑ 1.0 9 1

Nested Loop Left Join (cost=64.35..322.40 rows=9 width=2,890) (actual time=0.276..0.446 rows=9 loops=1)

  • Join Filter: ((cdn7.tenant_id = c.tenant_id) AND (cdn7.community_id = c.id))
6. 0.002 0.433 ↑ 1.0 9 1

Nested Loop Left Join (cost=64.21..314.08 rows=9 width=2,672) (actual time=0.267..0.433 rows=9 loops=1)

  • Join Filter: ((cdn5.tenant_id = c.tenant_id) AND (cdn5.community_id = c.id))
7. 0.002 0.422 ↑ 1.0 9 1

Nested Loop Left Join (cost=64.06..305.76 rows=9 width=2,454) (actual time=0.261..0.422 rows=9 loops=1)

  • Join Filter: ((cdn4.tenant_id = c.tenant_id) AND (cdn4.community_id = c.id))
8. 0.004 0.411 ↑ 1.0 9 1

Nested Loop Left Join (cost=63.92..297.43 rows=9 width=2,236) (actual time=0.254..0.411 rows=9 loops=1)

  • Join Filter: ((cdn3.tenant_id = c.tenant_id) AND (cdn3.community_id = c.id))
9. 0.003 0.398 ↑ 1.0 9 1

Nested Loop Left Join (cost=63.78..289.11 rows=9 width=2,018) (actual time=0.245..0.398 rows=9 loops=1)

  • Join Filter: ((cdn2.tenant_id = c.tenant_id) AND (cdn2.community_id = c.id))
10. 0.004 0.386 ↑ 1.0 9 1

Nested Loop Left Join (cost=63.64..280.79 rows=9 width=1,800) (actual time=0.238..0.386 rows=9 loops=1)

  • Join Filter: ((cdn1.tenant_id = c.tenant_id) AND (cdn1.community_id = c.id))
11. 0.009 0.373 ↑ 1.0 9 1

Nested Loop Left Join (cost=63.49..272.47 rows=9 width=1,582) (actual time=0.228..0.373 rows=9 loops=1)

  • Join Filter: (lut.tenant_id = c.tenant_id)
12. 0.020 0.355 ↑ 1.0 9 1

Hash Left Join (cost=63.35..270.08 rows=9 width=1,421) (actual time=0.217..0.355 rows=9 loops=1)

  • Hash Cond: ((SubPlan 32) = cahome.id)
13. 0.019 0.237 ↑ 1.0 9 1

Hash Left Join (cost=42.32..244.75 rows=9 width=1,405) (actual time=0.185..0.237 rows=9 loops=1)

  • Hash Cond: (capostal.address_id = apostal.id)
  • Join Filter: (lut.tenant_id = c.tenant_id)
14. 0.006 0.205 ↑ 1.0 9 1

Nested Loop Left Join (cost=28.72..231.13 rows=9 width=1,228) (actual time=0.158..0.205 rows=9 loops=1)

  • Join Filter: ((lut.tenant_id = c.tenant_id) AND (capostal.community_id = c.id))
15. 0.010 0.190 ↑ 1.0 9 1

Nested Loop Left Join (cost=28.72..214.68 rows=9 width=1,212) (actual time=0.146..0.190 rows=9 loops=1)

16. 0.000 0.180 ↑ 1.0 9 1

Nested Loop Left Join (cost=28.43..139.92 rows=9 width=1,212) (actual time=0.142..0.180 rows=9 loops=1)

  • Join Filter: (cpispouse.community_id = c.spouse_community_id)
17. 0.004 0.162 ↑ 1.0 9 1

Nested Loop Left Join (cost=28.43..138.78 rows=9 width=1,100) (actual time=0.128..0.162 rows=9 loops=1)

18. 0.005 0.149 ↑ 1.0 9 1

Merge Left Join (cost=28.15..56.04 rows=9 width=1,053) (actual time=0.121..0.149 rows=9 loops=1)

  • Merge Cond: (c.id = cpdefault.community_id)
  • Join Filter: (cpdefault.tenant_id = c.tenant_id)
19. 0.002 0.132 ↑ 1.0 9 1

Nested Loop Left Join (cost=18.63..46.44 rows=9 width=1,021) (actual time=0.108..0.132 rows=9 loops=1)

  • Join Filter: ((cdn6.tenant_id = c.tenant_id) AND (cdn6.community_id = c.id))
20. 0.009 0.121 ↑ 1.0 9 1

Nested Loop Left Join (cost=18.49..38.12 rows=9 width=803) (actual time=0.100..0.121 rows=9 loops=1)

  • Join Filter: ((lut.tenant_id = c.tenant_id) AND (lut.id = cpi.lookup_title_id))
  • Rows Removed by Join Filter: 54
21. 0.011 0.085 ↑ 1.0 9 1

Nested Loop Left Join (cost=18.20..19.51 rows=9 width=771) (actual time=0.075..0.085 rows=9 loops=1)

  • Join Filter: ((cpi.tenant_id = c.tenant_id) AND (cpi.community_id = c.id))
  • Filter: (((COALESCE(cpi.family_name, ''::character varying))::text <> 'TEST_ENV'::text) AND ((COALESCE(cpi.given_name, ''::character
22. 0.005 0.056 ↑ 1.0 9 1

Merge Left Join (cost=18.20..18.30 rows=9 width=170) (actual time=0.051..0.056 rows=9 loops=1)

  • Merge Cond: (c.id = cpdefaultsms.community_id)
  • Join Filter: (cpdefaultsms.tenant_id = c.tenant_id)
23. 0.034 0.034 ↑ 1.0 9 1

Sort (cost=8.69..8.71 rows=9 width=138) (actual time=0.032..0.034 rows=9 loops=1)

  • Sort Key: c.id
  • Sort Method: quicksort Memory: 25kB
  • -> Index Scan using community_tenant_id_idx on community c (cost=0.29..8.55 rows=9 width=138) (actual time=0.019..0.023
  • Index Cond: (tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid)
24. 0.003 0.017 ↓ 0.0 0 1

Materialize (cost=9.51..9.56 rows=1 width=64) (actual time=0.017..0.017 rows=0 loops=1)

25. 0.001 0.014 ↓ 0.0 0 1

Subquery Scan on cpdefaultsms (cost=9.51..9.55 rows=1 width=64) (actual time=0.014..0.014 rows=0 loops=1)

  • Filter: (cpdefaultsms.rownum = 1)
26. 0.001 0.013 ↓ 0.0 0 1

WindowAgg (cost=9.51..9.54 rows=1 width=224) (actual time=0.013..0.013 rows=0 loops=1)

27. 0.012 0.012 ↓ 0.0 0 1

Sort (cost=9.51..9.52 rows=1 width=73) (actual time=0.012..0.012 rows=0 loops=1)

  • Sort Key: cpdefaultsmssq.community_id, cpdefaultsmssq.default_sms, cpdefaultsmssq.created DESC
  • Sort Method: quicksort Memory: 25kB
  • -> Bitmap Heap Scan on community_phone cpdefaultsmssq (cost=4.16..9.50 rows=1 width=73) (actual time=
  • Recheck Cond: (tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid)
  • Filter: default_sms
  • -> Bitmap Index Scan on community_phone_ix_community_id_tenant_id (cost=0.00..4.16 rows=2 width
  • Index Cond: (tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid)
28. 0.002 0.018 ↓ 0.0 0 9

Materialize (cost=0.00..1.00 rows=1 width=633) (actual time=0.002..0.002 rows=0 loops=9)

29. 0.016 0.016 ↓ 0.0 0 1

Seq Scan on community_personal_info cpi (cost=0.00..1.00 rows=1 width=633) (actual time=0.016..0.016 rows=0 loops=1)

  • Filter: (tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid)
30. 0.027 0.027 ↑ 1.0 6 9

Materialize (cost=0.29..17.68 rows=6 width=64) (actual time=0.002..0.003 rows=6 loops=9)

  • -> Index Scan using lookup_title_tenant_id_idx on lookup_title lut (cost=0.29..17.65 rows=6 width=64) (actual time=0.011..0.013 row
  • Index Cond: (tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid)
31. 0.009 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

32. 0.000 0.000 ↓ 0.0

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn6 (cost=0.14..8.16 rows=1 width=250) (actual rows= loops=)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'internalNameFormat'::text))
33. 0.005 0.012 ↓ 0.0 0 1

Materialize (cost=9.51..9.56 rows=1 width=64) (actual time=0.012..0.012 rows=0 loops=1)

34. 0.000 0.007 ↓ 0.0 0 1

Subquery Scan on cpdefault (cost=9.51..9.55 rows=1 width=64) (actual time=0.007..0.007 rows=0 loops=1)

  • Filter: (cpdefault.rownum = 1)
35. 0.001 0.007 ↓ 0.0 0 1

WindowAgg (cost=9.51..9.54 rows=1 width=224) (actual time=0.007..0.007 rows=0 loops=1)

36. 0.006 0.006 ↓ 0.0 0 1

Sort (cost=9.51..9.52 rows=1 width=73) (actual time=0.006..0.006 rows=0 loops=1)

  • Sort Key: cpdefaultsq.community_id, cpdefaultsq."default", cpdefaultsq.created DESC
  • Sort Method: quicksort Memory: 25kB
  • -> Bitmap Heap Scan on community_phone cpdefaultsq (cost=4.16..9.50 rows=1 width=73) (actual time=0.002..0.002 rows=0 loops=1
  • Recheck Cond: (tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid)
  • Filter: "default
  • -> Bitmap Index Scan on community_phone_ix_community_id_tenant_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..
  • Index Cond: (tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid)
37. 0.009 0.009 ↓ 0.0 0 9

Index Scan using community_pkey on community cspouse (cost=0.29..8.30 rows=1 width=47) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (id = c.spouse_community_id)
38. 0.008 0.018 ↓ 0.0 0 9

Materialize (cost=0.00..1.00 rows=1 width=128) (actual time=0.002..0.002 rows=0 loops=9)

39. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on community_personal_info cpispouse (cost=0.00..1.00 rows=1 width=128) (actual time=0.010..0.010 rows=0 loops=1)

40. 0.000 0.000 ↓ 0.0 0 9

Index Scan using lookup_title_pkey on lookup_title lutspouse (cost=0.29..8.31 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

  • Index Cond: (id = cpispouse.lookup_title_id)
41. 0.001 0.009 ↓ 0.0 0 9

Materialize (cost=0.00..16.14 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=9)

42. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on community_address capostal (cost=0.00..16.13 rows=2 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: (system_meaning = 'postal'::lookup_address_type_system_meaning)
43. 0.000 0.013 ↓ 0.0 0 1

Hash (cost=11.60..11.60 rows=160 width=209) (actual time=0.013..0.013 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
44. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on address apostal (cost=0.00..11.60 rows=160 width=209) (actual time=0.013..0.013 rows=0 loops=1)

45. 0.001 0.008 ↓ 0.0 0 1

Hash (cost=14.90..14.90 rows=490 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
46. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on community_address cahome (cost=0.00..14.90 rows=490 width=32) (actual time=0.007..0.007 rows=0 loops=1)

47.          

SubPlan (for Hash Left Join)

48. 0.072 0.090 ↓ 0.0 0 9

Limit (cost=4.16..9.51 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=9)

49. 0.009 0.018 ↓ 0.0 0 9

Bitmap Heap Scan on community_address tmpca (cost=4.16..9.51 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
  • Filter: ((system_meaning = 'home'::lookup_address_type_system_meaning) AND (tenant_id = c.tenant_id))
50. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_address_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
51. 0.009 0.009 ↓ 0.0 0 9

Index Scan using address_pkey on address ahome (cost=0.14..0.25 rows=1 width=209) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (id = cahome.address_id)
52. 0.004 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

53. 0.005 0.005 ↓ 0.0 0 1

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn1 (cost=0.14..8.16 rows=1 width=250) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'mailNameJoiner'::text))
54. 0.005 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

55. 0.004 0.004 ↓ 0.0 0 1

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn2 (cost=0.14..8.16 rows=1 width=250) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'externalNameFormat'::text))
56. 0.004 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

57. 0.005 0.005 ↓ 0.0 0 1

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn3 (cost=0.14..8.16 rows=1 width=250) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'legalNameFormat'::text))
58. 0.006 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

59. 0.003 0.003 ↓ 0.0 0 1

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn4 (cost=0.14..8.16 rows=1 width=250) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'salutationFormat'::text))
60. 0.006 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

61. 0.003 0.003 ↓ 0.0 0 1

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn5 (cost=0.14..8.16 rows=1 width=250) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'salutationPreferredFormat'::text))
62. 0.004 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

63. 0.005 0.005 ↓ 0.0 0 1

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn7 (cost=0.14..8.16 rows=1 width=250) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'mailNameFormat'::text))
64. 0.006 0.009 ↓ 0.0 0 9

Materialize (cost=0.14..8.17 rows=1 width=250) (actual time=0.001..0.001 rows=0 loops=9)

65. 0.003 0.003 ↓ 0.0 0 1

Index Scan using community_display_name_community_id_display_type_uk on community_display_name cdn8 (cost=0.14..8.16 rows=1 width=250) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: ((tenant_id = '64ace45e-396d-48c5-af16-ef9523287e29'::uuid) AND ((display_type)::text = 'salutationJoiner'::text))
66.          

SubPlan (for Nested Loop Left Join)

67. 0.000 0.000 ↑ 1.0 1 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=9)

68. 0.000 0.000 ↑ 1.0 1 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=9)

69. 0.000 0.000 ↑ 1.0 1 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=9)

70.          

SubPlan (for Result)

71. 0.000 0.000 ↑ 1.0 1 9

Result (cost=0.00..0.04 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=9)

72. 0.009 0.099 ↓ 0.0 0 9

Limit (cost=9.51..9.52 rows=1 width=36) (actual time=0.011..0.011 rows=0 loops=9)

73. 0.081 0.090 ↓ 0.0 0 9

Sort (cost=9.51..9.52 rows=1 width=36) (actual time=0.010..0.010 rows=0 loops=9)

  • Sort Key: ce.sort_order
  • Sort Method: quicksort Memory: 25kB
74. 0.000 0.009 ↓ 0.0 0 9

Bitmap Heap Scan on community_email ce (cost=4.16..9.50 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
  • Filter: "default
75. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_email_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
76. 0.000 0.009 ↓ 0.0 0 9

Append (cost=0.29..8.35 rows=2 width=23) (actual time=0.001..0.001 rows=0 loops=9)

77. 0.009 0.009 ↓ 0.0 0 9

Result (cost=0.29..8.30 rows=1 width=14) (actual time=0.001..0.001 rows=0 loops=9)

  • One-Time Filter: (c.record_type = 'Person'::community_record_type)
78. 0.000 0.000 ↓ 0.0 0 9

Index Scan using lookup_gender_pkey on lookup_gender lug (cost=0.29..8.30 rows=1 width=14) (actual time=0.000..0.000 rows=0 loops=9)

  • Index Cond: (id = cpi.lookup_gender_id)
79. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (c.record_type = 'Company'::community_record_type)
80. 0.000 0.009 ↓ 0.0 0 9

Append (cost=0.29..8.35 rows=2 width=24) (actual time=0.001..0.001 rows=0 loops=9)

81. 0.009 0.009 ↓ 0.0 0 9

Result (cost=0.29..8.30 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=9)

  • One-Time Filter: (c.record_type = 'Person'::community_record_type)
82. 0.000 0.000 ↓ 0.0 0 9

Index Scan using lookup_gender_pkey on lookup_gender lug_1 (cost=0.29..8.30 rows=1 width=17) (actual time=0.000..0.000 rows=0 loops=9)

  • Index Cond: (id = cpi.lookup_gender_id)
83. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (c.record_type = 'Company'::community_record_type)
84. 0.063 0.081 ↓ 0.0 0 9

Nested Loop (cost=0.29..9.41 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=9)

85. 0.018 0.018 ↓ 0.0 0 9

Seq Scan on community_personal_info cpi_1 (cost=0.00..1.00 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=9)

  • Filter: (community_id = c.id)
86. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_title_pkey on lookup_title lt (cost=0.29..8.31 rows=1 width=32) (never executed)

  • Index Cond: (id = cpi_1.lookup_title_id)
  • Filter: (tenant_id = c.tenant_id)
87. 0.000 0.090 ↓ 0.0 0 9

Limit (cost=17.78..17.79 rows=1 width=20) (actual time=0.010..0.010 rows=0 loops=9)

88. 0.009 0.090 ↓ 0.0 0 9

Sort (cost=17.78..17.79 rows=1 width=20) (actual time=0.010..0.010 rows=0 loops=9)

  • Sort Key: ca.sort_order
  • Sort Method: quicksort Memory: 25kB
89. 0.072 0.081 ↓ 0.0 0 9

Nested Loop (cost=4.31..17.77 rows=1 width=20) (actual time=0.008..0.009 rows=0 loops=9)

90. 0.000 0.009 ↓ 0.0 0 9

Bitmap Heap Scan on community_address ca (cost=4.16..9.51 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
  • Filter: (system_meaning = 'home'::lookup_address_type_system_meaning)
91. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_address_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
92. 0.000 0.000 ↓ 0.0 0

Index Only Scan using address_pkey on address a (cost=0.14..8.16 rows=1 width=16) (never executed)

  • Index Cond: (id = ca.address_id)
  • Heap Fetches: 0
93. 0.000 0.018 ↓ 0.0 0 9

Result (cost=0.29..16.34 rows=1 width=218) (actual time=0.002..0.002 rows=0 loops=9)

  • One-Time Filter: ((NOT cpi.deceased) OR (cpi.deceased IS NULL))
94. 0.009 0.018 ↓ 0.0 0 9

Nested Loop (cost=0.29..16.34 rows=1 width=218) (actual time=0.002..0.002 rows=0 loops=9)

95. 0.009 0.009 ↓ 0.0 0 9

Index Scan using community_phone_ix_community_id_tenant_id on community_phone cp (cost=0.15..8.17 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: ((tenant_id = c.tenant_id) AND (community_id = c.id))
  • Filter: ("default" AND (NOT confidential_phone))
96. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_phone_type_pkey on lookup_phone_type lpt (cost=0.14..8.16 rows=1 width=234) (never executed)

  • Index Cond: (id = cp.lookup_phone_type_id)
97. 0.009 0.018 ↓ 0.0 0 9

Result (cost=0.29..16.34 rows=1 width=218) (actual time=0.002..0.002 rows=0 loops=9)

  • One-Time Filter: ((NOT cpi.deceased) OR (cpi.deceased IS NULL))
98. 0.000 0.009 ↓ 0.0 0 9

Nested Loop (cost=0.29..16.34 rows=1 width=218) (actual time=0.001..0.001 rows=0 loops=9)

99. 0.009 0.009 ↓ 0.0 0 9

Index Scan using community_phone_ix_community_id_tenant_id on community_phone cp_1 (cost=0.15..8.17 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: ((tenant_id = c.tenant_id) AND (community_id = c.id))
  • Filter: (default_sms AND (NOT confidential_phone))
100. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_phone_type_pkey on lookup_phone_type lpt_1 (cost=0.14..8.16 rows=1 width=234) (never executed)

  • Index Cond: (id = cp_1.lookup_phone_type_id)
101. 0.054 0.063 ↑ 1.0 1 9

Aggregate (cost=25.85..25.86 rows=1 width=32) (actual time=0.007..0.007 rows=1 loops=9)

102. 0.000 0.009 ↓ 0.0 0 9

Bitmap Heap Scan on community_email ce_1 (cost=4.16..9.50 rows=2 width=69) (actual time=0.001..0.001 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
103. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_email_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
104.          

SubPlan (for Aggregate)

105. 0.000 0.000 ↓ 0.0 0

Result (cost=0.14..8.16 rows=1 width=32) (never executed)

  • One-Time Filter: ((NOT cpi.deceased) OR (cpi.deceased IS NULL))
106. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_email_type_pkey on lookup_email_type let (cost=0.14..8.16 rows=1 width=316) (never executed)

  • Index Cond: (id = ce_1.lookup_email_type_id)
107. 0.000 0.009 ↑ 1.0 1 9

Aggregate (cost=16.34..16.35 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=9)

108. 0.009 0.009 ↓ 0.0 0 9

Index Scan using community_phone_ix_community_id_tenant_id on community_phone cp_2 (cost=0.15..8.17 rows=1 width=103) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: ((tenant_id = c.tenant_id) AND (community_id = c.id))
109.          

SubPlan (for Aggregate)

110. 0.000 0.000 ↓ 0.0 0

Result (cost=0.14..8.16 rows=1 width=32) (never executed)

  • One-Time Filter: (((NOT cpi.deceased) OR (cpi.deceased IS NULL)) AND (NOT cp_2.confidential_phone))
111. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_phone_type_pkey on lookup_phone_type lpt_2 (cost=0.14..8.16 rows=1 width=316) (never executed)

  • Index Cond: (id = cp_2.lookup_phone_type_id)
112. 0.009 0.063 ↑ 1.0 1 9

Aggregate (cost=55.54..55.55 rows=1 width=32) (actual time=0.007..0.007 rows=1 loops=9)

113. 0.045 0.054 ↓ 0.0 0 9

Nested Loop (cost=4.31..21.90 rows=2 width=309) (actual time=0.006..0.006 rows=0 loops=9)

114. 0.000 0.009 ↓ 0.0 0 9

Bitmap Heap Scan on community_address ca_1 (cost=4.16..9.50 rows=2 width=52) (actual time=0.001..0.001 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
115. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_address_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
116. 0.000 0.000 ↓ 0.0 0

Index Scan using address_pkey on address a_1 (cost=0.14..6.16 rows=1 width=273) (never executed)

  • Index Cond: (id = ca_1.address_id)
117.          

SubPlan (for Aggregate)

118. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_address_type_pkey on lookup_address_type lat (cost=0.14..8.16 rows=1 width=32) (never executed)

  • Index Cond: (id = ca_1.lookup_address_type_id)
119. 0.000 0.000 ↓ 0.0 0

Subquery Scan on lucq (cost=0.42..4.46 rows=1 width=32) (never executed)

120. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.42..4.45 rows=1 width=80) (never executed)

121. 0.000 0.000 ↓ 0.0 0

Append (cost=0.42..8.47 rows=2 width=80) (never executed)

122. 0.000 0.000 ↓ 0.0 0

Result (cost=0.42..8.44 rows=1 width=44) (never executed)

  • One-Time Filter: (((NOT cpi.deceased) OR (cpi.deceased IS NULL)) AND (NOT a_1.confidential_address))
123. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_country_pkey on lookup_country luc (cost=0.42..8.44 rows=1 width=44) (never executed)

  • Index Cond: (id = a_1.lookup_country_id)
124. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 2 (cost=0.00..0.02 rows=1 width=80) (never executed)

125. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=80) (never executed)

  • One-Time Filter: (cpi.deceased OR a_1.confidential_address)
126. 0.000 0.000 ↓ 0.0 0

Subquery Scan on lusq (cost=0.14..4.19 rows=1 width=32) (never executed)

127. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.14..4.17 rows=1 width=48) (never executed)

128. 0.000 0.000 ↓ 0.0 0

Append (cost=0.14..8.20 rows=2 width=48) (never executed)

129. 0.000 0.000 ↓ 0.0 0

Result (cost=0.14..8.16 rows=1 width=234) (never executed)

  • One-Time Filter: (((NOT cpi.deceased) OR (cpi.deceased IS NULL)) AND (NOT a_1.confidential_address))
130. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_state_pkey on lookup_state lus (cost=0.14..8.16 rows=1 width=234) (never executed)

  • Index Cond: (id = a_1.lookup_state_id)
131. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 2_1 (cost=0.00..0.02 rows=1 width=48) (never executed)

132. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=48) (never executed)

  • One-Time Filter: (cpi.deceased OR a_1.confidential_address)
133. 0.009 0.009 ↓ 0.0 0 9

Seq Scan on community_personal_info info (cost=0.00..9.31 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=9)

  • Filter: (community_id = c.spouse_community_id)
134.          

SubPlan (for Seq Scan)

135. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_title_pkey on lookup_title lkpttl (cost=0.29..8.31 rows=1 width=32) (never executed)

  • Index Cond: (id = info.lookup_title_id)
  • Filter: (tenant_id = info.tenant_id)
136. 0.036 0.045 ↓ 0.0 0 9

Nested Loop (cost=0.29..9.41 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=9)

137. 0.009 0.009 ↓ 0.0 0 9

Seq Scan on community_personal_info spousecpi (cost=0.00..1.00 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=9)

  • Filter: (community_id = cspouse.id)
138. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_title_pkey on lookup_title lt1 (cost=0.29..8.31 rows=1 width=32) (never executed)

  • Index Cond: (id = spousecpi.lookup_title_id)
  • Filter: (tenant_id = c.tenant_id)
139. 0.000 0.063 ↓ 0.0 0 9

Limit (cost=17.78..17.79 rows=1 width=36) (actual time=0.007..0.007 rows=0 loops=9)

140. 0.009 0.063 ↓ 0.0 0 9

Sort (cost=17.78..17.79 rows=1 width=36) (actual time=0.007..0.007 rows=0 loops=9)

  • Sort Key: ca_2.sort_order
  • Sort Method: quicksort Memory: 25kB
141. 0.045 0.054 ↓ 0.0 0 9

Nested Loop (cost=4.31..17.77 rows=1 width=36) (actual time=0.006..0.006 rows=0 loops=9)

142. 0.000 0.009 ↓ 0.0 0 9

Bitmap Heap Scan on community_address ca_2 (cost=4.16..9.51 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
  • Filter: (system_meaning = 'home'::lookup_address_type_system_meaning)
143. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_address_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
144. 0.000 0.000 ↓ 0.0 0

Index Scan using address_pkey on address a_2 (cost=0.14..8.16 rows=1 width=48) (never executed)

  • Index Cond: (id = ca_2.address_id)
145. 0.000 0.063 ↓ 0.0 0 9

Limit (cost=17.78..17.79 rows=1 width=36) (actual time=0.007..0.007 rows=0 loops=9)

146. 0.009 0.063 ↓ 0.0 0 9

Sort (cost=17.78..17.79 rows=1 width=36) (actual time=0.007..0.007 rows=0 loops=9)

  • Sort Key: ca1.sort_order
  • Sort Method: quicksort Memory: 25kB
147. 0.045 0.054 ↓ 0.0 0 9

Nested Loop (cost=4.31..17.77 rows=1 width=36) (actual time=0.006..0.006 rows=0 loops=9)

148. 0.000 0.009 ↓ 0.0 0 9

Bitmap Heap Scan on community_address ca1 (cost=4.16..9.51 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
  • Filter: (system_meaning = 'postal'::lookup_address_type_system_meaning)
149. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_address_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
150. 0.000 0.000 ↓ 0.0 0

Index Scan using address_pkey on address a1 (cost=0.14..8.16 rows=1 width=48) (never executed)

  • Index Cond: (id = ca1.address_id)
151. 0.000 0.063 ↓ 0.0 0 9

Limit (cost=17.78..17.79 rows=1 width=20) (actual time=0.007..0.007 rows=0 loops=9)

152. 0.009 0.063 ↓ 0.0 0 9

Sort (cost=17.78..17.79 rows=1 width=20) (actual time=0.007..0.007 rows=0 loops=9)

  • Sort Key: ca_3.sort_order
  • Sort Method: quicksort Memory: 25kB
153. 0.045 0.054 ↓ 0.0 0 9

Nested Loop (cost=4.31..17.77 rows=1 width=20) (actual time=0.006..0.006 rows=0 loops=9)

154. 0.000 0.009 ↓ 0.0 0 9

Bitmap Heap Scan on community_address ca_3 (cost=4.16..9.51 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=9)

  • Recheck Cond: (community_id = c.id)
  • Filter: (system_meaning = 'home'::lookup_address_type_system_meaning)
155. 0.009 0.009 ↓ 0.0 0 9

Bitmap Index Scan on community_address_ix_community_id (cost=0.00..4.16 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (community_id = c.id)
156. 0.000 0.000 ↓ 0.0 0

Index Only Scan using address_pkey on address a_3 (cost=0.14..8.16 rows=1 width=16) (never executed)

  • Index Cond: (id = ca_3.address_id)
  • Heap Fetches: 0
157. 0.000 0.009 ↓ 0.0 0 9

Limit (cost=0.42..4.45 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=9)

158. 0.009 0.009 ↓ 0.0 0 9

Append (cost=0.42..8.47 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=9)

159. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.42..8.44 rows=1 width=18) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (((NOT cpi.deceased) OR (cpi.deceased IS NULL)) AND (NOT ahome.confidential_address))
160. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_country_pkey on lookup_country luc_1 (cost=0.42..8.44 rows=1 width=18) (never executed)

  • Index Cond: (id = ahome.lookup_country_id)
161. 0.000 0.000 ↓ 0.0 0 9

Subquery Scan on *SELECT* 2_2 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

162. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (cpi.deceased OR ahome.confidential_address)
163. 0.000 0.009 ↓ 0.0 0 9

Limit (cost=0.14..4.17 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=9)

164. 0.009 0.009 ↓ 0.0 0 9

Append (cost=0.14..8.20 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=9)

165. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.14..8.16 rows=1 width=218) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (((NOT cpi.deceased) OR (cpi.deceased IS NULL)) AND (NOT ahome.confidential_address))
166. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_state_pkey on lookup_state lus1 (cost=0.14..8.16 rows=1 width=218) (never executed)

  • Index Cond: (id = ahome.lookup_state_id)
167. 0.000 0.000 ↓ 0.0 0 9

Subquery Scan on *SELECT* 2_3 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

168. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (cpi.deceased OR ahome.confidential_address)
169. 0.000 0.009 ↓ 0.0 0 9

Limit (cost=0.42..4.45 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=9)

170. 0.009 0.009 ↓ 0.0 0 9

Append (cost=0.42..8.47 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=9)

171. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.42..8.44 rows=1 width=18) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (((NOT cpi.deceased) OR (cpi.deceased IS NULL)) AND (NOT apostal.confidential_address))
172. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_country_pkey on lookup_country luc1 (cost=0.42..8.44 rows=1 width=18) (never executed)

  • Index Cond: (id = apostal.lookup_country_id)
173. 0.000 0.000 ↓ 0.0 0 9

Subquery Scan on *SELECT* 2_4 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

174. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (cpi.deceased OR apostal.confidential_address)
175. 0.000 0.009 ↓ 0.0 0 9

Limit (cost=0.14..4.17 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=9)

176. 0.009 0.009 ↓ 0.0 0 9

Append (cost=0.14..8.20 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=9)

177. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.14..8.16 rows=1 width=218) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (((NOT cpi.deceased) OR (cpi.deceased IS NULL)) AND (NOT apostal.confidential_address))
178. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_state_pkey on lookup_state lus1_1 (cost=0.14..8.16 rows=1 width=218) (never executed)

  • Index Cond: (id = apostal.lookup_state_id)
179. 0.000 0.000 ↓ 0.0 0 9

Subquery Scan on *SELECT* 2_5 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

180. 0.000 0.000 ↓ 0.0 0 9

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=9)

  • One-Time Filter: (cpi.deceased OR apostal.confidential_address)
181. 0.009 0.018 ↑ 1.0 1 9

Aggregate (cost=19.47..19.48 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=9)

182. 0.000 0.009 ↓ 0.0 0 9

Nested Loop (cost=4.32..19.46 rows=1 width=78) (actual time=0.001..0.001 rows=0 loops=9)

  • Join Filter: (lc.id = cc.lookup_constituency_id)
183. 0.009 0.009 ↓ 0.0 0 9

Index Scan using lookup_constituency_ix_tenant_code on lookup_constituency lc (cost=0.14..8.16 rows=1 width=94) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (tenant_id = c.tenant_id)
184. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on community_constituency cc (cost=4.17..11.29 rows=1 width=16) (never executed)

  • Recheck Cond: (community_id = c.id)
  • Filter: (tenant_id = c.tenant_id)
185. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on community_constituency_community_id_lookup_constituency_id_uk (cost=0.00..4.17 rows=3 width=0) (never executed)

  • Index Cond: (community_id = c.id)
186. 0.045 0.054 ↓ 0.0 0 9

Nested Loop (cost=0.29..9.45 rows=1 width=32) (actual time=0.006..0.006 rows=0 loops=9)

187. 0.009 0.009 ↓ 0.0 0 9

Seq Scan on community_personal_info cpi_2 (cost=0.00..1.00 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=9)

  • Filter: (community_id = c.id)
188. 0.000 0.000 ↓ 0.0 0

Index Scan using lookup_gender_pkey on lookup_gender lg (cost=0.29..8.31 rows=1 width=47) (never executed)

  • Index Cond: (id = cpi_2.lookup_gender_id)
  • Filter: (tenant_id = c.tenant_id)
Planning time : 16.175 ms
Execution time : 3.410 ms