explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CLCtc

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.019 ↓ 0.0 0 1

Limit (cost=2,769.61..24,075.78 rows=4 width=1,574) (actual time=0.019..0.019 rows=0 loops=1)

  • Buffers: shared hit=3
2. 0.001 0.019 ↓ 0.0 0 1

Nested Loop (cost=2,769.61..130,606.6 rows=24 width=1,574) (actual time=0.019..0.019 rows=0 loops=1)

  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (p.person_root_id = secr.get_current_org_root_id()) OR (u.person_root_id = secr.get_current_individual_root_id()))
  • Buffers: shared hit=3
3. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=2,769.33..129,043.61 rows=47 width=1,995) (actual time=0.018..0.018 rows=0 loops=1)

  • Buffers: shared hit=3
4. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=1,413.77..65,330.9 rows=47 width=1,963) (actual time=0.018..0.018 rows=0 loops=1)

  • Buffers: shared hit=3
5. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=58.25..1,619.95 rows=47 width=1,931) (actual time=0.018..0.018 rows=0 loops=1)

  • Buffers: shared hit=3
6. 0.001 0.018 ↓ 0.0 0 1

Nested Loop (cost=57.97..1,605.96 rows=47 width=1,889) (actual time=0.018..0.018 rows=0 loops=1)

  • Buffers: shared hit=3
7. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=57.54..1,575.87 rows=47 width=1,780) (actual time=0.017..0.017 rows=0 loops=1)

  • Buffers: shared hit=3
8. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=55.14..288.62 rows=3 width=1,772) (actual time=0.017..0.017 rows=0 loops=1)

  • Buffers: shared hit=3
9. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=54.71..263.28 rows=3 width=1,764) (actual time=0.017..0.017 rows=0 loops=1)

  • Buffers: shared hit=3
10. 0.001 0.017 ↓ 0.0 0 1

Nested Loop (cost=54.57..262.42 rows=3 width=1,772) (actual time=0.017..0.017 rows=0 loops=1)

  • Buffers: shared hit=3
11. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=54.29..261.52 rows=3 width=1,722) (actual time=0.016..0.016 rows=0 loops=1)

  • Buffers: shared hit=3
12. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=53.87..246.26 rows=1 width=1,722) (actual time=0.016..0.016 rows=0 loops=1)

  • Buffers: shared hit=3
13. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=53.59..237.95 rows=1 width=1,714) (actual time=0.016..0.016 rows=0 loops=1)

  • Buffers: shared hit=3
14. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=45.79..96.27 rows=1 width=1,682) (actual time=0.016..0.016 rows=0 loops=1)

  • Buffers: shared hit=3
15. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=28.89..79.35 rows=1 width=1,642) (actual time=0.015..0.015 rows=0 loops=1)

  • Buffers: shared hit=3
16. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=26.18..76.62 rows=1 width=1,078) (actual time=0.015..0.015 rows=0 loops=1)

  • Buffers: shared hit=3
17. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=17.86..68.27 rows=1 width=986) (actual time=0.015..0.015 rows=0 loops=1)

  • Buffers: shared hit=3
18. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=9.41..59.8 rows=1 width=418) (actual time=0.015..0.015 rows=0 loops=1)

  • Buffers: shared hit=3
19. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=1.26..33.84 rows=1 width=263) (actual time=0.015..0.015 rows=0 loops=1)

  • Buffers: shared hit=3
20. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=1.26..31.88 rows=1 width=244) (actual time=0.014..0.014 rows=0 loops=1)

  • Buffers: shared hit=3
21. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=1.13..31.72 rows=1 width=98) (actual time=0.014..0.014 rows=0 loops=1)

  • Buffers: shared hit=3
22. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=0.86..30.68 rows=1 width=106) (actual time=0.014..0.014 rows=0 loops=1)

  • Buffers: shared hit=3
23. 0.014 0.014 ↓ 0.0 0 1

Index Scan using fdc_request_request_date_i on fdc_request request (cost=0.43..14.48 rows=1 width=90) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: ((request.request_date >= '2020-01-28 00:00:00'::timestamp without time zone) AND (request.request_date < '2020-01-30 00:00:00'::timestamp without time zone))
  • Filter: ((request.request_type_id = ANY (ARRAY[nsi.c_request_type_031_id(), nsi.c_request_type_032_id(), nsi.c_request_type_033_id(), nsi.c_request_type_035_id(), nsi.c_request_type_078_id()])) AND (request.request_type_id = ANY (ARRAY[nsi.c_request_type_031_id(), nsi.c_request_type_033_id(), nsi.c_request_type_032_id(), nsi.c_request_type_034_id(), nsi.c_request_type_035_id(), nsi.c_request_type_029_id(), nsi.c_request_type_030_id(), nsi.c_request_type_028_id(), nsi.c_request_type_027_id(), nsi.c_request_type_081_id(), nsi.c_request_type_078_id(), nsi.c_request_type_075_id(), nsi.c_request_type_076_id(), nsi.c_request_type_077_id(), nsi.c_request_type_070_id(), nsi.c_request_type_071_id(), nsi.c_request_type_072_id(), nsi.c_request_type_079_id(), nsi.c_request_type_080_id()])))
  • Buffers: shared hit=3
24. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_status_history_request_i on fdc_request_status_history rsh (cost=0.43..16.18 rows=2 width=24) (never executed)

  • Index Cond: (rsh.request_id = request.id)
  • Filter: ((statement_timestamp() >= rsh.date_from) AND (statement_timestamp() <= rsh.date_to) AND (rsh.status_id <> request.c_request_status_removed_id()))
25. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.27..1.03 rows=1 width=8) (never executed)

26. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_change_status_reason_pk on fdc_change_status_reason c_1 (cost=0.14..0.16 rows=1 width=16) (never executed)

  • Index Cond: (c_1.id = rsh.reason_id)
27. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_object_type_pk on fdc_object_type c_2 (cost=0.13..0.63 rows=1 width=8) (never executed)

  • Index Cond: (c_2.id = c_1.object_type_id)
28. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_status_pk on fdc_request_status c (cost=0.14..0.15 rows=1 width=146) (never executed)

  • Index Cond: (c.id = rsh.status_id)
29. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_request_status_translation t (cost=0..1.82 rows=11 width=35) (never executed)

  • Filter: (t.language_id = lang.get_current_lang_id())
30. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=8.15..24.77 rows=95 width=155) (never executed)

31. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on fdc_request_type_translation t_1 (cost=5.01..20.44 rows=95 width=147) (never executed)

32. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on fdc_request_type_translation_l_i (cost=0..4.99 rows=95 width=0) (never executed)

  • Index Cond: (t_1.language_id = lang.get_current_lang_id())
33. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=1.95..1.95 rows=95 width=16) (never executed)

34. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_request_type c_3 (cost=0..1.95 rows=95 width=16) (never executed)

35. 0.000 0.000 ↓ 0.0 0 0

Limit (cost=8.45..8.46 rows=1 width=576) (never executed)

36. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=8.45..8.46 rows=1 width=576) (never executed)

  • Sort Key: e.start_date
37. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_pts_encumbrance_start_request_i on fdc_pts_encumbrance e (cost=0.42..8.44 rows=1 width=576) (never executed)

  • Index Cond: (e.start_request_id = request.id)
38. 0.000 0.000 ↓ 0.0 0 0

Limit (cost=8.32..8.33 rows=1 width=100) (never executed)

39. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=8.32..8.33 rows=1 width=100) (never executed)

  • Sort Key: fdc_pts_ownership.date_add
40. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_pts_ownership_req_i on fdc_pts_ownership fdc_pts_ownership (cost=0.29..8.31 rows=1 width=100) (never executed)

  • Index Cond: (fdc_pts_ownership.request_id = request.id)
41. 0.000 0.000 ↓ 0.0 0 0

Limit (cost=2.71..2.71 rows=1 width=572) (never executed)

42. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=2.71..2.71 rows=1 width=572) (never executed)

  • Sort Key: fdc_pts_dealer.start_date
43. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_pts_dealer fdc_pts_dealer (cost=0..2.7 rows=1 width=572) (never executed)

  • Filter: (fdc_pts_dealer.start_request_id = request.id)
44. 0.000 0.000 ↓ 0.0 0 0

Aggregate (cost=16.89..16.9 rows=1 width=40) (never executed)

45. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.85..16.89 rows=1 width=16) (never executed)

46. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_request_pts_req_i on fdc_request_pts pts_list (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (pts_list.request_id = request.id)
47. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_pts_root_pk on fdc_pts_root r (cost=0.42..8.44 rows=1 width=24) (never executed)

  • Index Cond: (r.id = pts_list.pasport_root_id)
48. 0.000 0.000 ↓ 0.0 0 0

Limit (cost=7.81..141.66 rows=1 width=2,505) (never executed)

49. 0.000 0.000 ↓ 0.0 0 0

Result (cost=7.81..1,480.17 rows=11 width=2,505) (never executed)

50. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=7.81..1,480.17 rows=11 width=2,505) (never executed)

  • Filter: ((p_1.person_root_id = COALESCE(ind_per_1.person_root_id, lp_per.person_root_id)) OR (p_1.person_root_id = org.person_root_id) OR ((c_5.code)::text = ANY ('{10,11,13}'::text[])))
51. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=7.37..1,452.03 rows=55 width=295) (never executed)

52. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=6.94..1,416.82 rows=55 width=295) (never executed)

53. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=4.54..129.57 rows=3 width=295) (never executed)

54. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=4.11..106.61 rows=3 width=295) (never executed)

55. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=3.83..105.72 rows=3 width=287) (never executed)

56. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=3.42..90.46 rows=1 width=287) (never executed)

57. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=3.14..82.15 rows=1 width=287) (never executed)

58. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.71..73.71 rows=1 width=287) (never executed)

59. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.71..70.57 rows=1 width=295) (never executed)

60. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.28..62.11 rows=1 width=279) (never executed)

61. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2..52.88 rows=1 width=149) (never executed)

62. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.57..36.42 rows=1 width=157) (never executed)

63. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.29..28.12 rows=1 width=157) (never executed)

64. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.86..19.67 rows=1 width=40) (never executed)

65. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.43..11.22 rows=1 width=32) (never executed)

66. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_signatory_person_req_i on fdc_request_signatory_person sp (cost=0.43..8.45 rows=1 width=40) (never executed)

  • Index Cond: (sp.request_id = request.id)
67. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0..2.7 rows=6 width=8) (never executed)

68. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0..2.6 rows=6 width=8) (never executed)

69. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_person_type c_4 (cost=0..1.06 rows=6 width=8) (never executed)

70. 0.000 0.000 ↓ 0.0 0 0

Materialize (cost=0..1.45 rows=1 width=8) (never executed)

71. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_person_type_translation t_2 (cost=0..1.45 rows=1 width=8) (never executed)

  • Filter: (t_2.language_id = lang.get_current_lang_id())
72. 0.000 0.000 ↓ 0.0 0 0

Materialize (cost=0..0.03 rows=1 width=0) (never executed)

73. 0.000 0.000 ↓ 0.0 0 0

Subquery Scan on fdc_translate_messages_boolean_v (cost=0..0.02 rows=1 width=0) (never executed)

74. 0.000 0.000 ↓ 0.0 0 0

Result (cost=0..0.01 rows=1 width=64) (never executed)

75. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person p_1 (cost=0.43..8.45 rows=1 width=16) (never executed)

  • Index Cond: (p_1.id = sp.person_id)
76. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_legal_person_id_i on fdc_legal_person pers_org (cost=0.43..8.45 rows=1 width=125) (never executed)

  • Index Cond: (pers_org.id = sp.person_id)
77. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_individual_pk on fdc_individual pers_ind (cost=0.28..8.3 rows=1 width=8) (never executed)

  • Index Cond: (pers_ind.id = sp.person_id)
78. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_legal_person_id_i on fdc_legal_person pers_lp (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (pers_lp.id = sp.legal_person_id)
79. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.28..9.22 rows=1 width=146) (never executed)

80. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_signatory_type_pk on fdc_signatory_type c_5 (cost=0.14..8.15 rows=1 width=146) (never executed)

  • Index Cond: (c_5.id = sp.signatory_type_id)
81. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_signatory_type_translation_stype_i on fdc_signatory_type_translation t_3 (cost=0.14..0.96 rows=1 width=8) (never executed)

  • Index Cond: ((t_3.signatory_type_id = c_5.id) AND (t_3.language_id = lang.get_current_lang_id()))
82. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_pk on fdc_request req (cost=0.43..8.45 rows=1 width=32) (never executed)

  • Index Cond: (req.id = request.id)
83. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_request_type reqtype (cost=0..1.95 rows=95 width=8) (never executed)

84. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person org (cost=0.43..8.45 rows=1 width=16) (never executed)

  • Index Cond: (org.id = req.org_add)
85. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_user_id_i on fdc_user usr (cost=0.28..8.3 rows=1 width=16) (never executed)

  • Index Cond: (usr.id = req.user_add)
86. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person per_2 (cost=0.41..15.23 rows=3 width=16) (never executed)

  • Index Cond: (per_2.person_root_id = usr.person_root_id)
  • Filter: ((statement_timestamp() >= per_2.date_from) AND (statement_timestamp() <= per_2.date_to))
87. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_individual_pk on fdc_individual ind_1 (cost=0.28..0.3 rows=1 width=8) (never executed)

  • Index Cond: (ind_1.id = per_2.id)
88. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person ind_per_1 (cost=0.43..7.65 rows=1 width=16) (never executed)

  • Index Cond: (ind_1.id = ind_per_1.id)
89. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.4..130.51 rows=29,857 width=16) (never executed)

90. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.98..24.62 rows=173 width=16) (never executed)

91. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.57..24 rows=1 width=24) (never executed)

92. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.14..16.1 rows=1 width=24) (never executed)

93. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.71..8.2 rows=1 width=24) (never executed)

94. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_official_person_pk on fdc_official_person ofp_1 (cost=0.28..0.3 rows=1 width=24) (never executed)

  • Index Cond: (ofp_1.id = per_2.id)
95. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_person_id_i on fdc_person per_3 (cost=0.43..7.9 rows=1 width=8) (never executed)

  • Index Cond: (per_3.id = ofp_1.id)
96. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person ind_ver_1 (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (ind_ver_1.id = ofp_1.individual_id)
97. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person leg_ver_1 (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (leg_ver_1.id = ofp_1.legal_person_id)
98. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person ind_per_2 (cost=0.41..0.58 rows=3 width=8) (never executed)

  • Index Cond: (ind_per_2.person_root_id = ind_ver_1.person_root_id)
  • Filter: ((statement_timestamp() >= ind_per_2.date_from) AND (statement_timestamp() <= ind_per_2.date_to))
99. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person leg_per_1 (cost=0.41..0.58 rows=3 width=16) (never executed)

  • Index Cond: (leg_per_1.person_root_id = leg_ver_1.person_root_id)
  • Filter: ((statement_timestamp() >= leg_per_1.date_from) AND (statement_timestamp() <= leg_per_1.date_to))
100. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_legal_person_id_i on fdc_legal_person lp_op_1 (cost=0.43..0.64 rows=1 width=8) (never executed)

  • Index Cond: (lp_op_1.id = leg_per_1.id)
101. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person lp_per (cost=0.43..0.49 rows=1 width=16) (never executed)

  • Index Cond: (lp_op_1.id = lp_per.id)
102. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_user_id_i on fdc_user req_initiator (cost=0.28..8.3 rows=1 width=16) (never executed)

  • Index Cond: (req_initiator.id = request.user_add)
103. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person per (cost=0.41..15.23 rows=3 width=16) (never executed)

  • Index Cond: (per.person_root_id = req_initiator.person_root_id)
  • Filter: ((statement_timestamp() >= per.date_from) AND (statement_timestamp() <= per.date_to))
104. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_individual_pk on fdc_individual ind (cost=0.28..0.3 rows=1 width=58) (never executed)

  • Index Cond: (ind.id = per.id)
105. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_type_pk on fdc_request_type rt (cost=0.14..0.29 rows=1 width=8) (never executed)

  • Index Cond: (rt.id = c_3.id)
  • Filter: (rt.is_visible_arm IS TRUE)
106. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person p (cost=0.43..8.45 rows=1 width=16) (never executed)

  • Index Cond: (p.id = request.org_add)
107. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.4..130.51 rows=29,857 width=24) (never executed)

108. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.98..24.62 rows=173 width=24) (never executed)

109. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.57..24 rows=1 width=24) (never executed)

110. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.14..16.1 rows=1 width=24) (never executed)

111. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.71..8.2 rows=1 width=24) (never executed)

112. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_official_person_pk on fdc_official_person ofp (cost=0.28..0.3 rows=1 width=24) (never executed)

  • Index Cond: (ofp.id = per.id)
113. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_person_id_i on fdc_person per_1 (cost=0.43..7.9 rows=1 width=8) (never executed)

  • Index Cond: (per_1.id = ofp.id)
114. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person ind_ver (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (ind_ver.id = ofp.individual_id)
115. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person leg_ver (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (leg_ver.id = ofp.legal_person_id)
116. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person ind_per (cost=0.41..0.58 rows=3 width=16) (never executed)

  • Index Cond: (ind_per.person_root_id = ind_ver.person_root_id)
  • Filter: ((statement_timestamp() >= ind_per.date_from) AND (statement_timestamp() <= ind_per.date_to))
117. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person leg_per (cost=0.41..0.58 rows=3 width=16) (never executed)

  • Index Cond: (leg_per.person_root_id = leg_ver.person_root_id)
  • Filter: ((statement_timestamp() >= leg_per.date_from) AND (statement_timestamp() <= leg_per.date_to))
118. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_legal_person_id_i on fdc_legal_person lp_op (cost=0.43..0.64 rows=1 width=125) (never executed)

  • Index Cond: (lp_op.id = leg_per.id)
119. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_individual_pk on fdc_individual ind_op (cost=0.28..0.3 rows=1 width=58) (never executed)

  • Index Cond: (ind_op.id = ind_per.id)
120. 0.000 0.000 ↓ 0.0 0 0

Aggregate (cost=1,355.52..1,355.53 rows=1 width=32) (never executed)

121. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=13.26..1,355.24 rows=55 width=125) (never executed)

122. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=10.86..67.99 rows=3 width=133) (never executed)

123. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=10.45..52.73 rows=1 width=133) (never executed)

124. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=10.17..44.42 rows=1 width=133) (never executed)

  • Filter: CASE WHEN (sp_1.confirmation_is_required OR (sp_1.confirmation_is_required IS NULL)) THEN CASE WHEN ((c_6.code)::text = ANY ('{1,2,5,8,9,10,11,13}'::text[])) THEN true ELSE CASE WHEN (((reqtype_1.code)::text = '077'::text) AND ((c_6.code)::text = '15'::text)) THEN true ELSE false END END ELSE CASE WHEN (((reqtype_1.code)::text = ANY ('{072,079}'::text[])) AND ((c_6.code)::text = '1'::text)) THEN true ELSE false END END
125. 0.000 0.000 ↓ 0.0 0 0

Merge Join (cost=10.17..42.79 rows=1 width=146) (never executed)

126. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.71..48.4 rows=95 width=154) (never executed)

127. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_type_pk on fdc_request_type reqtype_1 (cost=0.14..13.57 rows=95 width=12) (never executed)

128. 0.000 0.000 ↓ 0.0 0 0

Materialize (cost=1.57..33.65 rows=1 width=142) (never executed)

129. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.57..33.64 rows=1 width=142) (never executed)

130. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.29..25.34 rows=1 width=142) (never executed)

131. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.86..16.9 rows=1 width=25) (never executed)

132. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_signatory_person_req_i on fdc_request_signatory_person sp_1 (cost=0.43..8.45 rows=1 width=41) (never executed)

  • Index Cond: (sp_1.request_id = request.id)
133. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_person_id_i on fdc_person p_2 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (p_2.id = sp_1.person_id)
134. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_legal_person_id_i on fdc_legal_person pers_org_1 (cost=0.43..8.45 rows=1 width=125) (never executed)

  • Index Cond: (pers_org_1.id = sp_1.person_id)
135. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_individual_pk on fdc_individual pers_ind_1 (cost=0.28..8.3 rows=1 width=8) (never executed)

  • Index Cond: (pers_ind_1.id = sp_1.person_id)
136. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=8.46..8.46 rows=1 width=32) (never executed)

  • Sort Key: req_1.request_type_id
137. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_pk on fdc_request req_1 (cost=0.43..8.45 rows=1 width=32) (never executed)

  • Index Cond: (req_1.id = request.id)
138. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_signatory_type c_6 (cost=0..1.15 rows=15 width=146) (never executed)

139. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_user_id_i on fdc_user usr_1 (cost=0.28..8.3 rows=1 width=16) (never executed)

  • Index Cond: (usr_1.id = req_1.user_add)
140. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person per_4 (cost=0.41..15.23 rows=3 width=16) (never executed)

  • Index Cond: (per_4.person_root_id = usr_1.person_root_id)
  • Filter: ((statement_timestamp() >= per_4.date_from) AND (statement_timestamp() <= per_4.date_to))
141. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.4..130.51 rows=29,857 width=8) (never executed)

142. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.98..24.62 rows=173 width=16) (never executed)

143. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.57..24 rows=1 width=24) (never executed)

144. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.14..16.1 rows=1 width=24) (never executed)

145. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.71..8.2 rows=1 width=24) (never executed)

146. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_official_person_pk on fdc_official_person ofp_2 (cost=0.28..0.3 rows=1 width=24) (never executed)

  • Index Cond: (ofp_2.id = per_4.id)
147. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_person_id_i on fdc_person per_5 (cost=0.43..7.9 rows=1 width=8) (never executed)

  • Index Cond: (per_5.id = ofp_2.id)
148. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person ind_ver_2 (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (ind_ver_2.id = ofp_2.individual_id)
149. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person leg_ver_2 (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (leg_ver_2.id = ofp_2.legal_person_id)
150. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person ind_per_3 (cost=0.41..0.58 rows=3 width=8) (never executed)

  • Index Cond: (ind_per_3.person_root_id = ind_ver_2.person_root_id)
  • Filter: ((statement_timestamp() >= ind_per_3.date_from) AND (statement_timestamp() <= ind_per_3.date_to))
151. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person leg_per_2 (cost=0.41..0.58 rows=3 width=16) (never executed)

  • Index Cond: (leg_per_2.person_root_id = leg_ver_2.person_root_id)
  • Filter: ((statement_timestamp() >= leg_per_2.date_from) AND (statement_timestamp() <= leg_per_2.date_to))
152. 0.000 0.000 ↓ 0.0 0 0

Aggregate (cost=1,355.56..1,355.57 rows=1 width=32) (never executed)

153. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=13.26..1,355.28 rows=55 width=125) (never executed)

154. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=10.86..68.03 rows=3 width=133) (never executed)

155. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=10.45..52.77 rows=1 width=133) (never executed)

156. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=10.17..44.46 rows=1 width=133) (never executed)

  • Filter: CASE WHEN (sp_2.confirmation_is_required OR (sp_2.confirmation_is_required IS NULL)) THEN CASE WHEN ((c_7.code)::text = ANY ('{3,4,6,7,12}'::text[])) THEN true ELSE CASE WHEN (((reqtype_2.code)::text = ANY ('{075,081}'::text[])) AND ((c_7.code)::text = '15'::text)) THEN true ELSE false END END ELSE CASE WHEN (((reqtype_2.code)::text = ANY ('{071,072,079}'::text[])) AND ((c_7.code)::text = '3'::text)) THEN true WHEN (((reqtype_2.code)::text = '080'::text) AND ((c_7.code)::text = '1'::text)) THEN true ELSE false END END
157. 0.000 0.000 ↓ 0.0 0 0

Merge Join (cost=10.17..42.79 rows=1 width=146) (never executed)

158. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.71..48.4 rows=95 width=154) (never executed)

159. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_type_pk on fdc_request_type reqtype_2 (cost=0.14..13.57 rows=95 width=12) (never executed)

160. 0.000 0.000 ↓ 0.0 0 0

Materialize (cost=1.57..33.65 rows=1 width=142) (never executed)

161. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.57..33.64 rows=1 width=142) (never executed)

162. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.29..25.34 rows=1 width=142) (never executed)

163. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.86..16.9 rows=1 width=25) (never executed)

164. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_signatory_person_req_i on fdc_request_signatory_person sp_2 (cost=0.43..8.45 rows=1 width=41) (never executed)

  • Index Cond: (sp_2.request_id = request.id)
165. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_person_id_i on fdc_person p_3 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (p_3.id = sp_2.person_id)
166. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_legal_person_id_i on fdc_legal_person pers_org_2 (cost=0.43..8.45 rows=1 width=125) (never executed)

  • Index Cond: (pers_org_2.id = sp_2.person_id)
167. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_individual_pk on fdc_individual pers_ind_2 (cost=0.28..8.3 rows=1 width=8) (never executed)

  • Index Cond: (pers_ind_2.id = sp_2.person_id)
168. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=8.46..8.46 rows=1 width=32) (never executed)

  • Sort Key: req_2.request_type_id
169. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_pk on fdc_request req_2 (cost=0.43..8.45 rows=1 width=32) (never executed)

  • Index Cond: (req_2.id = request.id)
170. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_signatory_type c_7 (cost=0..1.15 rows=15 width=146) (never executed)

171. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_user_id_i on fdc_user usr_2 (cost=0.28..8.3 rows=1 width=16) (never executed)

  • Index Cond: (usr_2.id = req_2.user_add)
172. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person per_6 (cost=0.41..15.23 rows=3 width=16) (never executed)

  • Index Cond: (per_6.person_root_id = usr_2.person_root_id)
  • Filter: ((statement_timestamp() >= per_6.date_from) AND (statement_timestamp() <= per_6.date_to))
173. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.4..130.51 rows=29,857 width=8) (never executed)

174. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.98..24.62 rows=173 width=16) (never executed)

175. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.57..24 rows=1 width=24) (never executed)

176. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.14..16.1 rows=1 width=24) (never executed)

177. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.71..8.2 rows=1 width=24) (never executed)

178. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_official_person_pk on fdc_official_person ofp_3 (cost=0.28..0.3 rows=1 width=24) (never executed)

  • Index Cond: (ofp_3.id = per_6.id)
179. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using fdc_person_id_i on fdc_person per_7 (cost=0.43..7.9 rows=1 width=8) (never executed)

  • Index Cond: (per_7.id = ofp_3.id)
180. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person ind_ver_3 (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (ind_ver_3.id = ofp_3.individual_id)
181. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person leg_ver_3 (cost=0.43..7.9 rows=1 width=16) (never executed)

  • Index Cond: (leg_ver_3.id = ofp_3.legal_person_id)
182. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person ind_per_4 (cost=0.41..0.58 rows=3 width=8) (never executed)

  • Index Cond: (ind_per_4.person_root_id = ind_ver_3.person_root_id)
  • Filter: ((statement_timestamp() >= ind_per_4.date_from) AND (statement_timestamp() <= ind_per_4.date_to))
183. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_root_date_uk on fdc_person leg_per_3 (cost=0.41..0.58 rows=3 width=16) (never executed)

  • Index Cond: (leg_per_3.person_root_id = leg_ver_3.person_root_id)
  • Filter: ((statement_timestamp() >= leg_per_3.date_from) AND (statement_timestamp() <= leg_per_3.date_to))
184. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_user_id_i on fdc_user u (cost=0.28..8.3 rows=1 width=16) (never executed)

  • Index Cond: (u.id = request.user_add)
185.          

SubPlan (for Nested Loop)

186. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.86..24.93 rows=1 width=0) (never executed)

187. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_signatory_person_req_i on fdc_request_signatory_person sp_3 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (sp_3.request_id = request.id)
188. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_person_id_i on fdc_person sp_per (cost=0.43..8.46 rows=1 width=8) (never executed)

  • Index Cond: (sp_per.id = sp_3.person_id)
  • Filter: (sp_per.person_root_id = ANY (ARRAY[secr.get_current_org_root_id(), secr.get_current_individual_root_id()]))
189. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.43..103,730.83 rows=1 width=8) (never executed)

190. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on fdc_person sp_per_1 (cost=0..98,809.95 rows=1 width=8) (never executed)

  • Filter: (sp_per_1.person_root_id = ANY (ARRAY[secr.get_current_org_root_id(), secr.get_current_individual_root_id()]))
191. 0.000 0.000 ↓ 0.0 0 0

Index Scan using fdc_request_signatory_person_pers_i on fdc_request_signatory_person sp_4 (cost=0.43..4,902.78 rows=1,811 width=16) (never executed)

  • Index Cond: (sp_4.person_id = sp_per_1.id)