explain.depesz.com

PostgreSQL's explain analyze made readable

Result: REdN

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

Result (cost=342,750.04..342,997.48 rows=7 width=2,535) (actual rows= loops=)

2.          

Initplan (for Result)

3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=35,539.02..35,540.91 rows=189 width=4) (actual rows= loops=)

  • Group Key: edl.entity_id
4.          

CTE user_data_filter

5. 0.000 0.000 ↓ 0.0

Index Scan using idx_user_data_access_user_id on user_data_access (cost=0.56..9,424.31 rows=9,214 width=23) (actual rows= loops=)

  • Index Cond: (user_id = 4,171)
  • Filter: (NOT deleted)
6. 0.000 0.000 ↓ 0.0

Append (cost=0.43..26,114.24 rows=189 width=4) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..10,427.00 rows=183 width=4) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

CTE Scan on user_data_filter da (cost=0.00..184.28 rows=4,607 width=8) (actual rows= loops=)

  • Filter: self_access
9. 0.000 0.000 ↓ 0.0

Index Scan using idx_entity_data_link_entity_type_id_ancestor_type_id_ancestor_i on entity_data_link edl (cost=0.43..2.21 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((entity_type_id = 12) AND (ancestor_type_id = da.entity_type_id) AND (ancestor_id = da.entity_id))
  • Filter: (NOT deleted)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..15,684.40 rows=6 width=4) (actual rows= loops=)

  • Join Filter: (edc.ancestor_type_id = ANY (da_1.access_type_ids))
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..15,441.21 rows=480 width=40) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

CTE Scan on user_data_filter da_1 (cost=0.00..184.28 rows=4,607 width=40) (actual rows= loops=)

  • Filter: (NOT self_access)
13. 0.000 0.000 ↓ 0.0

Index Scan using idx_entity_data_link_ancestor_type_id_ancestor_id on entity_data_link edl_1 (cost=0.43..3.30 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((ancestor_type_id = da_1.entity_type_id) AND (ancestor_id = da_1.entity_id))
  • Filter: (parent AND (NOT deleted))
14. 0.000 0.000 ↓ 0.0

Index Scan using idx_entity_data_link_entity_type_id_ancestor_type_id_ancestor_i on entity_data_link edc (cost=0.43..0.48 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((entity_type_id = 12) AND (ancestor_type_id = edl_1.entity_type_id) AND (ancestor_id = edl_1.entity_id))
  • Filter: (NOT deleted)
15. 0.000 0.000 ↓ 0.0

Sort (cost=307,209.12..307,209.14 rows=7 width=2,347) (actual rows= loops=)

  • Sort Key: cd.status_id
16. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=307,206.08..307,209.02 rows=7 width=2,347) (actual rows= loops=)

  • Group Key: cd.id, dno.id, rl.id, cntrct.id, lcdt.alias, lcdst.alias, cy.short_name, (get_label_by_id((dtc.name)::text, dtc.name_label_id, cntrct.client_id, 1)), f.alias, dtc.name, tz.time_zone, ets.id, ets1.id, res.id, rcl.id, lcpt.alias, lcop.alias, tier.name, (array_to_string(array_agg(DISTINCT rg.name), ', '::text)), (array_to_string(array_agg(DISTINCT rg_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT ct.name), ', '::text)), (array_to_string(array_agg(DISTINCT cst.name), ', '::text)), (array_to_string(array_agg(DISTINCT pr.name), ', '::text)), (array_to_string(array_agg(DISTINCT i.name), ', '::text)), (array_to_string(array_agg(DISTINCT pl.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub.name), ', '::text)), (array_to_string(array_agg(DISTINCT mkt.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT market.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc_1.name), ', '::text)), pt.id, au_lmby.last_name, au_lmby.first_name, vn.name
17. 0.000 0.000 ↓ 0.0

Sort (cost=307,206.08..307,206.10 rows=7 width=1,611) (actual rows= loops=)

  • Sort Key: cd.id, dno.id, rl.id, cntrct.id, lcdt.alias, lcdst.alias, cy.short_name, (get_label_by_id((dtc.name)::text, dtc.name_label_id, cntrct.client_id, 1)), f.alias, dtc.name, tz.time_zone, ets.id, ets1.id, res.id, rcl.id, lcpt.alias, lcop.alias, tier.name, (array_to_string(array_agg(DISTINCT rg.name), ', '::text)), (array_to_string(array_agg(DISTINCT rg_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT ct.name), ', '::text)), (array_to_string(array_agg(DISTINCT cst.name), ', '::text)), (array_to_string(array_agg(DISTINCT pr.name), ', '::text)), (array_to_string(array_agg(DISTINCT i.name), ', '::text)), (array_to_string(array_agg(DISTINCT pl.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub.name), ', '::text)), (array_to_string(array_agg(DISTINCT mkt.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT market.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc_1.name), ', '::text)), pt.id, au_lmby.last_name, au_lmby.first_name, vn.name
18. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=279,604.36..307,205.99 rows=7 width=1,611) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=279,604.08..307,189.07 rows=7 width=1,577) (actual rows= loops=)

  • Merge Cond: (cd.id = leccc.entity_id)
20. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=279,249.17..306,788.13 rows=7 width=1,545) (actual rows= loops=)

  • Merge Cond: (cd.id = lecicp.entity_id)
21. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=273,037.22..299,318.87 rows=7 width=1,513) (actual rows= loops=)

  • Merge Cond: (cd.id = lecm.entity_id)
22. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=267,312.17..292,416.15 rows=7 width=1,481) (actual rows= loops=)

  • Merge Cond: (cd.id = lech.entity_id)
23. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=261,813.69..285,694.69 rows=7 width=1,449) (actual rows= loops=)

  • Merge Cond: (cd.id = lecc.entity_id)
24. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=260,849.13..284,488.90 rows=7 width=1,417) (actual rows= loops=)

  • Merge Cond: (cd.id = leicp.entity_id)
25. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=251,365.90..273,251.85 rows=7 width=1,385) (actual rows= loops=)

  • Merge Cond: (cd.id = lem.entity_id)
26. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=242,259.08..262,441.90 rows=7 width=1,353) (actual rows= loops=)

  • Merge Cond: (cd.id = leh.entity_id)
27. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=234,229.68..252,701.42 rows=7 width=1,321) (actual rows= loops=)

  • Merge Cond: (cd.id = lepl.entity_id)
28. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=234,229.26..247,317.48 rows=7 width=1,289) (actual rows= loops=)

  • Merge Cond: (cd.id = lei.entity_id)
29. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=229,874.40..241,487.99 rows=7 width=1,257) (actual rows= loops=)

  • Merge Cond: (cd.id = lcp.entity_id)
30. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,698.27..228,783.61 rows=7 width=1,225) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,698.14..228,781.82 rows=7 width=1,223) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,697.99..228,780.59 rows=7 width=1,216) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,697.85..228,779.36 rows=7 width=1,205) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,697.71..228,777.47 rows=7 width=1,194) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,697.57..228,775.60 rows=7 width=1,187) (actual rows= loops=)

  • Join Filter: ((rcl.client_id = cd.client_id) AND (res.id = rcl.responsibility_id))
36. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,697.57..228,773.15 rows=7 width=1,168) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,697.44..228,771.52 rows=7 width=1,155) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,697.17..228,764.09 rows=7 width=1,131) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=218,696.89..228,762.00 rows=7 width=1,111) (actual rows= loops=)

  • Join Filter: (epr_cp.entity_id = cd.dnoid)
40. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=203,269.89..210,556.72 rows=1 width=1,043) (actual rows= loops=)

  • Merge Cond: (cd.id = ller_1.entity_id)
41. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=187,857.16..192,736.74 rows=1 width=1,011) (actual rows= loops=)

  • Merge Cond: (cd.id = ller.entity_id)
42. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=178,687.14..183,562.15 rows=1 width=979) (actual rows= loops=)

  • Merge Cond: (cd.id = les.entity_id)
43. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=42,547.41..44,837.59 rows=1 width=947) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=42,546.99..44,834.96 rows=1 width=927) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=42,546.86..44,834.67 rows=1 width=922) (actual rows= loops=)

  • Merge Cond: (cd.id = lef.entity_id)
46. 0.000 0.000 ↓ 0.0

Sort (cost=131.71..131.71 rows=1 width=890) (actual rows= loops=)

  • Sort Key: cd.id
47. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.50..131.70 rows=1 width=890) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.36..131.37 rows=1 width=890) (actual rows= loops=)

  • Join Filter: ((f.client_id = cd.client_id) AND (f.frequency_id = cd.frequency_id))
49. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.36..128.31 rows=1 width=880) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.21..128.14 rows=1 width=865) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.79..125.50 rows=1 width=841) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.50..124.57 rows=1 width=796) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3.21..114.67 rows=4 width=747) (actual rows= loops=)

  • Hash Cond: (cd.time_zone_id = tz.id)
  • Filter: ((cd.due_date >= change_tz('2019-08-01 05:30:00+05:30'::timestamp with time zone, tz.time_zone, 'UTC'::character varying)) AND (cd.due_date <= change_tz('2020-09-02 05:29:59+05:30'::timestamp with time zone, tz.time_zone, 'UTC'::character varying)))
54. 0.000 0.000 ↓ 0.0

Index Scan using idx_child_dno_2 on child_dno cd (cost=0.29..111.15 rows=33 width=735) (actual rows= loops=)

  • Index Cond: (dnoid = ANY ($19))
  • Filter: ((NOT deleted) AND (client_id = 1,002) AND (status_id = ANY ('{1626,1627,1628,1629,1630,2,4,21}'::integer[])))
55. 0.000 0.000 ↓ 0.0

Hash (cost=2.41..2.41 rows=41 width=20) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Seq Scan on time_zone tz (cost=0.00..2.41 rows=41 width=20) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Index Scan using dno_deleted_ix on dno (cost=0.29..2.48 rows=1 width=49) (actual rows= loops=)

  • Index Cond: (id = cd.dnoid)
  • Filter: (status_id = ANY ('{5}'::integer[]))
58. 0.000 0.000 ↓ 0.0

Index Scan using pk_contract on contract cntrct (cost=0.29..0.93 rows=1 width=49) (actual rows= loops=)

  • Index Cond: (id = dno.contract_id)
59. 0.000 0.000 ↓ 0.0

Index Scan using pk_relation on relation rl (cost=0.42..2.64 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (cd.relation_id = id)
60. 0.000 0.000 ↓ 0.0

Index Scan using pk_entity_type on entity_type dtc (cost=0.15..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (id = cntrct.document_type_id)
61. 0.000 0.000 ↓ 0.0

Seq Scan on link_client_frequency f (cost=0.00..2.76 rows=20 width=22) (actual rows= loops=)

  • Filter: (client_id = 1,002)
62. 0.000 0.000 ↓ 0.0

Index Scan using pk_currency on currency cy (cost=0.14..0.33 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = cd.currency_id)
63. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=42,415.15..43,907.55 rows=63,631 width=36) (actual rows= loops=)

  • Group Key: lef.entity_id
64. 0.000 0.000 ↓ 0.0

Sort (cost=42,415.15..42,594.46 rows=71,725 width=18) (actual rows= loops=)

  • Sort Key: lef.entity_id
65. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3.56..36,630.46 rows=71,725 width=18) (actual rows= loops=)

  • Hash Cond: (lef.function_id = ct.id)
66. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_function_4 on link_entity_function lef (cost=0.43..36,423.11 rows=71,725 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
67. 0.000 0.000 ↓ 0.0

Hash (cost=2.50..2.50 rows=50 width=18) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Seq Scan on contract_type ct (cost=0.00..2.50 rows=50 width=18) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Index Scan using pk_priority_table on priority_table pt (cost=0.13..0.25 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (id = cd.priority_id)
70. 0.000 0.000 ↓ 0.0

Index Scan using pk_vendor on vendor vn (cost=0.42..2.64 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (id = cd.vendor_id)
71. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=136,139.73..138,023.48 rows=56,085 width=36) (actual rows= loops=)

  • Group Key: les.entity_id
72. 0.000 0.000 ↓ 0.0

Sort (cost=136,139.73..136,487.22 rows=138,997 width=37) (actual rows= loops=)

  • Sort Key: les.entity_id
73. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=54.38..124,266.12 rows=138,997 width=37) (actual rows= loops=)

  • Hash Cond: (les.service_id = cst.id)
74. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_service_5 on link_entity_service les (cost=0.44..123,845.86 rows=138,997 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
75. 0.000 0.000 ↓ 0.0

Hash (cost=40.64..40.64 rows=1,064 width=37) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Seq Scan on contract_sub_type cst (cost=0.00..40.64 rows=1,064 width=37) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=9,170.03..9,172.95 rows=130 width=36) (actual rows= loops=)

  • Group Key: ller.entity_id
78. 0.000 0.000 ↓ 0.0

Sort (cost=9,170.03..9,170.35 rows=130 width=12) (actual rows= loops=)

  • Sort Key: ller.entity_id
79. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.43..9,165.46 rows=130 width=12) (actual rows= loops=)

  • Join Filter: (rg.id = ller.region_id)
80. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_region_5 on link_entity_region ller (cost=0.43..9,123.97 rows=130 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
  • Filter: (NOT global)
81. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2.31 rows=21 width=12) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Seq Scan on region rg (cost=0.00..2.21 rows=21 width=12) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=15,412.73..16,980.58 rows=67,151 width=36) (actual rows= loops=)

  • Group Key: ller_1.entity_id
84. 0.000 0.000 ↓ 0.0

Sort (cost=15,412.73..15,599.59 rows=74,745 width=12) (actual rows= loops=)

  • Sort Key: ller_1.entity_id
85. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2.90..9,362.24 rows=74,745 width=12) (actual rows= loops=)

  • Hash Cond: (ller_1.region_id = rg_1.id)
86. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_region_5 on link_entity_region ller_1 (cost=0.43..9,123.97 rows=74,745 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
  • Filter: global
87. 0.000 0.000 ↓ 0.0

Hash (cost=2.21..2.21 rows=21 width=12) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Seq Scan on region rg_1 (cost=0.00..2.21 rows=21 width=12) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=15,426.99..17,178.72 rows=45,625 width=72) (actual rows= loops=)

  • Group Key: epr_cp.entity_id, epr_cp.document_id
90. 0.000 0.000 ↓ 0.0

Sort (cost=15,426.99..15,549.21 rows=48,888 width=23) (actual rows= loops=)

  • Sort Key: epr_cp.entity_id, epr_cp.document_id
91. 0.000 0.000 ↓ 0.0

Index Scan using idx_dno_page_reference_4 on entity_page_reference epr_cp (cost=0.42..11,619.31 rows=48,888 width=23) (actual rows= loops=)

  • Index Cond: (entity_type_id = 12)
92. 0.000 0.000 ↓ 0.0

Index Scan using pk_work_flow_status on work_flow_status ets (cost=0.28..0.30 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (id = dno.status_id)
93. 0.000 0.000 ↓ 0.0

Index Scan using pk_work_flow_status on work_flow_status ets1 (cost=0.28..1.06 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (id = cd.status_id)
94. 0.000 0.000 ↓ 0.0

Index Scan using pk_responsibility on responsibility res (cost=0.13..0.25 rows=1 width=17) (actual rows= loops=)

  • Index Cond: (id = cd.responsibility_id)
95. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2.09 rows=3 width=27) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Seq Scan on responsibility_client_link rcl (cost=0.00..2.08 rows=3 width=27) (actual rows= loops=)

  • Filter: (client_id = 1,002)
97. 0.000 0.000 ↓ 0.0

Index Scan using pk_link_client_performance_type on link_client_performance_type lcpt (cost=0.14..0.26 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (id = cd.type)
  • Filter: ((client_id = 1,002) AND (client_id = cd.client_id))
98. 0.000 0.000 ↓ 0.0

Index Scan using pk_link_client_obligation_phase on link_client_obligation_phase lcop (cost=0.14..0.26 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (cd.phase_id = id)
  • Filter: ((client_id = 1,002) AND (client_id = cd.client_id))
99. 0.000 0.000 ↓ 0.0

Index Scan using pk_link_client_dno_type on link_client_dno_type lcdt (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (dno.dno_type_id = id)
  • Filter: (client_id = dno.client_id)
100. 0.000 0.000 ↓ 0.0

Index Scan using pk_link_client_dno_sub_type on link_client_dno_sub_type lcdst (cost=0.14..0.17 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (dno.dno_sub_type_id = id)
  • Filter: (client_id = dno.client_id)
101. 0.000 0.000 ↓ 0.0

Index Scan using pk_tier on tier (cost=0.14..0.26 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (cd.tier_id = id)
102. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,176.13..12,161.38 rows=43,435 width=36) (actual rows= loops=)

  • Group Key: lcp.entity_id
103. 0.000 0.000 ↓ 0.0

Sort (cost=11,176.13..11,287.37 rows=44,497 width=22) (actual rows= loops=)

  • Sort Key: lcp.entity_id
104. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=6.76..7,740.64 rows=44,497 width=22) (actual rows= loops=)

  • Hash Cond: (lcp.project_id = pr.id)
105. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_contract_project_4 on link_entity_project lcp (cost=0.42..7,612.73 rows=44,497 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
106. 0.000 0.000 ↓ 0.0

Hash (cost=5.04..5.04 rows=104 width=22) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Seq Scan on project pr (cost=0.00..5.04 rows=104 width=22) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=4,354.86..5,305.00 rows=41,954 width=36) (actual rows= loops=)

  • Group Key: lei.entity_id
109. 0.000 0.000 ↓ 0.0

Sort (cost=4,354.86..4,461.80 rows=42,777 width=19) (actual rows= loops=)

  • Sort Key: lei.entity_id
110. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3.95..1,064.34 rows=42,777 width=19) (actual rows= loops=)

  • Hash Cond: (lei.initiative_id = i.id)
111. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_link_entity_initiative_4 on link_entity_initiative lei (cost=0.42..941.52 rows=42,777 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
112. 0.000 0.000 ↓ 0.0

Hash (cost=2.68..2.68 rows=68 width=19) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Seq Scan on initiative i (cost=0.00..2.68 rows=68 width=19) (actual rows= loops=)

114. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.42..4,829.96 rows=44,313 width=36) (actual rows= loops=)

  • Group Key: lepl.entity_id
115. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.42..3,939.02 rows=45,249 width=15) (actual rows= loops=)

  • Join Filter: (pl.id = lepl.project_level_id)
116. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_link_entity_project_level_6 on link_entity_project_level lepl (cost=0.42..995.78 rows=45,249 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
117. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2.07 rows=5 width=15) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Seq Scan on project_level pl (cost=0.00..2.05 rows=5 width=15) (actual rows= loops=)

119. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=8,029.40..9,133.82 rows=48,527 width=36) (actual rows= loops=)

  • Group Key: leh.entity_id
120. 0.000 0.000 ↓ 0.0

Sort (cost=8,029.40..8,154.90 rows=50,203 width=11) (actual rows= loops=)

  • Sort Key: leh.entity_id
121. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2.83..4,109.68 rows=50,203 width=11) (actual rows= loops=)

  • Hash Cond: (leh.hub_id = hub.id)
122. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_hub_4 on link_entity_hub leh (cost=0.42..3,944.46 rows=50,203 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
123. 0.000 0.000 ↓ 0.0

Hash (cost=2.18..2.18 rows=18 width=11) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Seq Scan on hub (cost=0.00..2.18 rows=18 width=11) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=9,106.82..10,216.39 rows=47,479 width=36) (actual rows= loops=)

  • Group Key: lem.entity_id
126. 0.000 0.000 ↓ 0.0

Sort (cost=9,106.82..9,239.28 rows=52,985 width=17) (actual rows= loops=)

  • Sort Key: lem.entity_id
127. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11.67..4,949.27 rows=52,985 width=17) (actual rows= loops=)

  • Hash Cond: (lem.market_id = mkt.id)
128. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_market_4 on link_entity_market lem (cost=0.42..4,796.42 rows=52,985 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
129. 0.000 0.000 ↓ 0.0

Hash (cost=8.33..8.33 rows=233 width=17) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Seq Scan on market mkt (cost=0.00..8.33 rows=233 width=17) (actual rows= loops=)

131. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=9,483.23..10,627.62 rows=48,749 width=36) (actual rows= loops=)

  • Group Key: leicp.entity_id
132. 0.000 0.000 ↓ 0.0

Sort (cost=9,483.23..9,620.95 rows=55,088 width=33) (actual rows= loops=)

  • Sort Key: leicp.entity_id
133. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=43.14..5,145.20 rows=55,088 width=33) (actual rows= loops=)

  • Hash Cond: (leicp.icp_id = icp.id)
134. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_icp_4 on link_entity_icp leicp (cost=0.42..4,957.14 rows=55,088 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
135. 0.000 0.000 ↓ 0.0

Hash (cost=32.32..32.32 rows=832 width=33) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Seq Scan on internal_contracting_party icp (cost=0.00..32.32 rows=832 width=33) (actual rows= loops=)

137. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=964.56..1,120.62 rows=6,811 width=36) (actual rows= loops=)

  • Group Key: lecc.entity_id
138. 0.000 0.000 ↓ 0.0

Sort (cost=964.56..982.53 rows=7,186 width=9) (actual rows= loops=)

  • Sort Key: lecc.entity_id
139. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=35.77..504.26 rows=7,186 width=9) (actual rows= loops=)

  • Hash Cond: (lecc.company_code_id = cc.id)
140. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_company_code_2 on link_entity_company_code lecc (cost=0.29..449.82 rows=7,186 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
141. 0.000 0.000 ↓ 0.0

Hash (cost=25.77..25.77 rows=777 width=9) (actual rows= loops=)

142. 0.000 0.000 ↓ 0.0

Seq Scan on company_code cc (cost=0.00..25.77 rows=777 width=9) (actual rows= loops=)

143. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=5,498.48..6,286.39 rows=34,801 width=36) (actual rows= loops=)

  • Group Key: lech.entity_id
144. 0.000 0.000 ↓ 0.0

Sort (cost=5,498.48..5,587.11 rows=35,453 width=11) (actual rows= loops=)

  • Sort Key: lech.entity_id
145. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2.83..2,819.36 rows=35,453 width=11) (actual rows= loops=)

  • Hash Cond: (lech.hub_id = hub_1.id)
146. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_contracting_hub_4 on link_entity_contracting_hub lech (cost=0.42..2,701.98 rows=35,453 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
147. 0.000 0.000 ↓ 0.0

Hash (cost=2.18..2.18 rows=18 width=11) (actual rows= loops=)

148. 0.000 0.000 ↓ 0.0

Seq Scan on hub hub_1 (cost=0.00..2.18 rows=18 width=11) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=5,725.05..6,487.69 rows=33,198 width=36) (actual rows= loops=)

  • Group Key: lecm.entity_id
150. 0.000 0.000 ↓ 0.0

Sort (cost=5,725.05..5,813.27 rows=35,289 width=17) (actual rows= loops=)

  • Sort Key: lecm.entity_id
151. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11.66..3,059.51 rows=35,289 width=17) (actual rows= loops=)

  • Hash Cond: (lecm.market_id = market.id)
152. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_contracting_market_4 on link_entity_contracting_market lecm (cost=0.42..2,953.95 rows=35,289 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
153. 0.000 0.000 ↓ 0.0

Hash (cost=8.33..8.33 rows=233 width=17) (actual rows= loops=)

154. 0.000 0.000 ↓ 0.0

Seq Scan on market (cost=0.00..8.33 rows=233 width=17) (actual rows= loops=)

155. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=6,211.95..7,028.36 rows=35,267 width=36) (actual rows= loops=)

  • Group Key: lecicp.entity_id
156. 0.000 0.000 ↓ 0.0

Sort (cost=6,211.95..6,307.75 rows=38,321 width=33) (actual rows= loops=)

  • Sort Key: lecicp.entity_id
157. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=43.14..3,294.60 rows=38,321 width=33) (actual rows= loops=)

  • Hash Cond: (lecicp.icp_id = icp_1.id)
158. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_contracting_icp_4 on link_entity_contracting_icp lecicp (cost=0.42..3,150.77 rows=38,321 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
159. 0.000 0.000 ↓ 0.0

Hash (cost=32.32..32.32 rows=832 width=33) (actual rows= loops=)

160. 0.000 0.000 ↓ 0.0

Seq Scan on internal_contracting_party icp_1 (cost=0.00..32.32 rows=832 width=33) (actual rows= loops=)

161. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=354.91..384.49 rows=1,314 width=36) (actual rows= loops=)

  • Group Key: leccc.entity_id
162. 0.000 0.000 ↓ 0.0

Sort (cost=354.91..358.20 rows=1,316 width=9) (actual rows= loops=)

  • Sort Key: leccc.entity_id
163. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=35.77..286.73 rows=1,316 width=9) (actual rows= loops=)

  • Hash Cond: (leccc.company_code_id = cc_1.id)
164. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_contracting_company_code_2 on link_entity_contracting_company_code leccc (cost=0.29..247.77 rows=1,316 width=8) (actual rows= loops=)

  • Index Cond: (entity_type_id = 13)
165. 0.000 0.000 ↓ 0.0

Hash (cost=25.77..25.77 rows=777 width=9) (actual rows= loops=)

166. 0.000 0.000 ↓ 0.0

Seq Scan on company_code cc_1 (cost=0.00..25.77 rows=777 width=9) (actual rows= loops=)

167. 0.000 0.000 ↓ 0.0

Index Scan using pk_app_user on app_user au_lmby (cost=0.28..2.17 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (id = cd.last_modified_by_user_id)
168.          

SubPlan (for Result)

169. 0.000 0.000 ↓ 0.0

Limit (cost=5.16..5.17 rows=1 width=40) (actual rows= loops=)

170. 0.000 0.000 ↓ 0.0

Sort (cost=5.16..5.17 rows=1 width=40) (actual rows= loops=)

  • Sort Key: epr1.date_created DESC
171. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.71..5.15 rows=1 width=40) (actual rows= loops=)

172. 0.000 0.000 ↓ 0.0

Index Scan using idx_dno_page_reference_4 on entity_page_reference epr1 (cost=0.42..2.64 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((entity_id = cd.dnoid) AND (entity_type_id = 12))
173. 0.000 0.000 ↓ 0.0

Index Scan using idx_contract_document_id_headerversion on contract_document cdoc (cost=0.29..2.51 rows=1 width=63) (actual rows= loops=)

  • Index Cond: (id = epr1.document_id)
174. 0.000 0.000 ↓ 0.0

Aggregate (cost=5.17..5.19 rows=1 width=32) (actual rows= loops=)

175. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.71..5.15 rows=1 width=70) (actual rows= loops=)

176. 0.000 0.000 ↓ 0.0

Index Scan using idx_dno_page_reference_4 on entity_page_reference epr1_1 (cost=0.42..2.64 rows=1 width=19) (actual rows= loops=)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
177. 0.000 0.000 ↓ 0.0

Index Scan using idx_contract_document_id_headerversion on contract_document cdoc_1 (cost=0.29..2.51 rows=1 width=59) (actual rows= loops=)

  • Index Cond: (id = epr1_1.document_id)
178. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.19..8.21 rows=1 width=32) (actual rows= loops=)

179. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.57..8.19 rows=2 width=12) (actual rows= loops=)

180. 0.000 0.000 ↓ 0.0

Unique (cost=3.42..3.43 rows=2 width=4) (actual rows= loops=)

181. 0.000 0.000 ↓ 0.0

Sort (cost=3.42..3.42 rows=2 width=4) (actual rows= loops=)

  • Sort Key: link_entity_country.country_id
182. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_country_3 on link_entity_country (cost=0.43..3.41 rows=2 width=4) (actual rows= loops=)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
  • Filter: global
183. 0.000 0.000 ↓ 0.0

Index Scan using pk_delivery_country on delivery_country (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = link_entity_country.country_id)
184. 0.000 0.000 ↓ 0.0

Aggregate (cost=5.80..5.82 rows=1 width=32) (actual rows= loops=)

185. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.56..5.80 rows=1 width=12) (actual rows= loops=)

186. 0.000 0.000 ↓ 0.0

HashAggregate (cost=3.41..3.42 rows=1 width=4) (actual rows= loops=)

  • Group Key: link_entity_country_1.country_id
187. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_country_3 on link_entity_country link_entity_country_1 (cost=0.43..3.41 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
  • Filter: (NOT global)
188. 0.000 0.000 ↓ 0.0

Index Scan using pk_delivery_country on delivery_country delivery_country_1 (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = link_entity_country_1.country_id)
189. 0.000 0.000 ↓ 0.0

Aggregate (cost=5.04..5.05 rows=1 width=32) (actual rows= loops=)

190. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.79..5.04 rows=1 width=12) (actual rows= loops=)

191. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2.65..2.66 rows=1 width=4) (actual rows= loops=)

  • Group Key: link_entity_delivery_country.country_id
192. 0.000 0.000 ↓ 0.0

Index Scan using idx_link_entity_delivery_country_6 on link_entity_delivery_country (cost=0.42..2.64 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
193. 0.000 0.000 ↓ 0.0

Index Scan using pk_delivery_country on delivery_country delivery_country_2 (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = link_entity_delivery_country.country_id)
194. 0.000 0.000 ↓ 0.0

Aggregate (cost=4.09..4.10 rows=1 width=32) (actual rows= loops=)

195. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.83..4.06 rows=1 width=66) (actual rows= loops=)

196. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1.41..1.42 rows=1 width=4) (actual rows= loops=)

  • Group Key: child_dno_contract_entity_link.contract_entity_id
197. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_child_dno_contract_entity_link_4 on child_dno_contract_entity_link (cost=0.29..1.41 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (child_dno_id = cd.id)
198. 0.000 0.000 ↓ 0.0

Index Scan using idx_contract_entity_2 on contract_entity (cost=0.42..2.64 rows=1 width=66) (actual rows= loops=)

  • Index Cond: ((id = child_dno_contract_entity_link.contract_entity_id) AND (contract_entity_type = 2))