explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PjNk

Settings
# exclusive inclusive rows x rows loops node
1. 0.026 2,721.071 ↑ 251.0 1 1

Hash Left Join (cost=340,391,120.92..340,391,570.05 rows=251 width=80) (actual time=2,721.066..2,721.071 rows=1 loops=1)

  • Output: contract_item.contract_item_id, COALESCE(base.quantity, '0'::numeric), COALESCE(obj.quantity, '0'::numeric)
  • Hash Cond: (contract_item.contract_item_id = obj.contract_item_id)
  • Buffers: shared hit=81,030, temp read=7,652 written=12,840
2.          

CTE obj

3. 0.005 1,271.533 ↓ 0.0 0 1

HashAggregate (cost=41,021,733.71..41,021,736.21 rows=200 width=48) (actual time=1,271.533..1,271.533 rows=0 loops=1)

  • Output: contract_product_materialized.contract_item_id, sum((((forecast_objective.quantity * "*SELECT* 1".conversion_factor) / ((upper(forecast_objective.date_range) - lower(forecast_objective.date_range)))::numeric) * ((upper((forecast_objective.date_range * contract_renew_version.date_range)) - lower((forecast_objective.date_range * contract_renew_version.date_range))))::numeric))
  • Group Key: contract_product_materialized.contract_item_id
  • Buffers: shared hit=7,833, temp read=3,585 written=5,992
4. 0.003 1,271.528 ↓ 0.0 0 1

Merge Join (cost=3,712,991.14..14,386,432.49 rows=710,274,699 width=121) (actual time=1,271.528..1,271.528 rows=0 loops=1)

  • Output: contract_product_materialized.contract_item_id, forecast_objective.quantity, "*SELECT* 1".conversion_factor, forecast_objective.date_range, contract_renew_version.date_range
  • Merge Cond: (contractee_view.company_id = forecast_objective.company_id)
  • Buffers: shared hit=7,833, temp read=3,585 written=5,992
5. 0.011 2.148 ↑ 18,470.0 1 1

Sort (cost=101,235.99..101,282.17 rows=18,470 width=32) (actual time=2.148..2.148 rows=1 loops=1)

  • Output: contractee_view.contract_id, contractee_view.company_id
  • Sort Key: contractee_view.company_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=458
6. 0.019 2.137 ↑ 9,235.0 2 1

Append (cost=49.74..99,927.13 rows=18,470 width=32) (actual time=2.078..2.137 rows=2 loops=1)

  • Buffers: shared hit=458
7. 0.001 0.031 ↓ 0.0 0 1

Subquery Scan on contractee_view (cost=49.74..49.90 rows=9 width=32) (actual time=0.031..0.031 rows=0 loops=1)

  • Output: contractee_view.contract_id, contractee_view.company_id
  • Buffers: shared hit=1
8. 0.001 0.030 ↓ 0.0 0 1

Unique (cost=49.74..49.81 rows=9 width=36) (actual time=0.030..0.030 rows=0 loops=1)

  • Output: cav.contract_amend_version_id, cmp.company_id, ct.internal_company_type
  • Buffers: shared hit=1
9. 0.005 0.029 ↓ 0.0 0 1

Sort (cost=49.74..49.77 rows=9 width=36) (actual time=0.029..0.029 rows=0 loops=1)

  • Output: cav.contract_amend_version_id, cmp.company_id, ct.internal_company_type
  • Sort Key: cmp.company_id, ct.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
10. 0.001 0.024 ↓ 0.0 0 1

Nested Loop (cost=21.25..49.60 rows=9 width=36) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: cav.contract_amend_version_id, cmp.company_id, ct.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=1
11. 0.001 0.023 ↓ 0.0 0 1

Nested Loop (cost=21.12..48.26 rows=9 width=48) (actual time=0.023..0.023 rows=0 loops=1)

  • Output: cav.contract_amend_version_id, cmp.company_id, cmp.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=1
12. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=20.84..45.14 rows=9 width=32) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: cav.contract_amend_version_id, cagg.agg_company_id
  • Buffers: shared hit=1
13. 0.001 0.022 ↓ 0.0 0 1

Nested Loop Left Join (cost=20.56..28.87 rows=9 width=48) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: c.contractee_company_id, cav.contract_amend_version_id, cg_42.company_id
  • Buffers: shared hit=1
14. 0.001 0.021 ↓ 0.0 0 1

Nested Loop Left Join (cost=20.29..24.50 rows=1 width=48) (actual time=0.021..0.021 rows=0 loops=1)

  • Output: c.contractee_company_id, cav.contract_amend_version_id, groupings_list.grouping_id
  • Join Filter: (groupings_list.original_grouping_id = c.contractee_grouping_id)
  • Buffers: shared hit=1
15. 0.000 0.020 ↓ 0.0 0 1

Nested Loop (cost=0.00..3.23 rows=1 width=48) (actual time=0.020..0.020 rows=0 loops=1)

  • Output: c.contractee_grouping_id, c.contractee_company_id, cav.contract_amend_version_id
  • Inner Unique: true
  • Join Filter: (crv.contract_family_id = c.contract_family_id)
  • Buffers: shared hit=1
16. 0.001 0.020 ↓ 0.0 0 1

Nested Loop (cost=0.00..2.17 rows=1 width=32) (actual time=0.020..0.020 rows=0 loops=1)

  • Output: crv.contract_family_id, cav.contract_amend_version_id
  • Inner Unique: true
  • Join Filter: (crv.contract_renew_version_id = cav.contract_renew_version_id)
  • Buffers: shared hit=1
17. 0.019 0.019 ↓ 0.0 0 1

Seq Scan on client_bimbo_bakeries.contract_amend_version cav (cost=0.00..1.07 rows=1 width=32) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: cav.contract_amend_version_id, cav.contract_renew_version_id, cav.contract_state, cav.contract_amend_version_parent_id, cav.contract_name, cav.contact_name, cav.contact_email, cav.contact_phone, cav.create_timestamp, cav.amend_version
  • Filter: (cav.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 6
  • Buffers: shared hit=1
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_bimbo_bakeries.contract_renew_version crv (cost=0.00..1.04 rows=4 width=32) (never executed)

  • Output: crv.contract_renew_version_id, crv.contract_family_id, crv.date_range, crv.create_timestamp, crv.dead, crv.renew_version
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_bimbo_bakeries.contract_family c (cost=0.00..1.03 rows=3 width=48) (never executed)

  • Output: c.contract_family_id, c.client_id, c.contractee_company_id, c.contractee_grouping_id, c.creator_id, c.contract_sequence, c.cost_basis_type, c.contract_type, c.contract_title, c.contract_template_id, c.payment_calendar_id, c.catch_all, c.accrual_quantity_source, c.import_contract_number, c.accrual_lumpsum_spread
20. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list (cost=20.29..20.75 rows=23 width=52) (never executed)

  • Output: groupings_list.original_grouping_id, NULL::uuid, groupings_list.grouping_id, NULL::integer
21.          

CTE groupings_list

22. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..20.29 rows=23 width=52) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_bimbo_bakeries.grouping_company pg (cost=0.00..1.03 rows=3 width=52) (never executed)

  • Output: pg.grouping_id, pg.parent_grouping_id, pg.grouping_id, 0
24. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.07..1.88 rows=2 width=52) (never executed)

  • Output: gl.original_grouping_id, cg.parent_grouping_id, cg.grouping_id, (gl.level + 1)
  • Hash Cond: (gl.grouping_id = cg.parent_grouping_id)
25. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl (cost=0.00..0.60 rows=30 width=36) (never executed)

  • Output: gl.original_grouping_id, gl.parent_grouping_id, gl.grouping_id, gl.level
26. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.03..1.03 rows=3 width=32) (never executed)

  • Output: cg.parent_grouping_id, cg.grouping_id
27. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_bimbo_bakeries.grouping_company cg (cost=0.00..1.03 rows=3 width=32) (never executed)

  • Output: cg.parent_grouping_id, cg.grouping_id
  • Filter: cg.active_ind
28. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_bimbo_bakeries.company_grouping cg_42 (cost=0.27..3.31 rows=106 width=32) (never executed)

  • Output: cg_42.company_id, cg_42.grouping_id
  • Index Cond: (cg_42.grouping_id = groupings_list.grouping_id)
  • Heap Fetches: 0
29. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_bimbo_bakeries.company_agg cagg (cost=0.28..1.80 rows=1 width=32) (never executed)

  • Output: cagg.company_id, cagg.agg_company_id
  • Index Cond: (cagg.company_id = COALESCE(c.contractee_company_id, cg_42.company_id))
  • Heap Fetches: 0
30. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_bimbo_bakeries.company cmp (cost=0.28..0.35 rows=1 width=32) (never executed)

  • Output: cmp.company_id, cmp.client_id, cmp.company_name, cmp.company_number, cmp.company_type_id, cmp.active_ind, cmp.address_1, cmp.address_2, cmp.address_3, cmp.address_4, cmp.city, cmp.region, cmp.postal_code, cmp.country, cmp.company_agg_id, cmp.deduction_interval, cmp.alt_address_active, cmp.alt_address_1, cmp.alt_address_2, cmp.alt_address_3, cmp.alt_address_4, cmp.alt_city, cmp.alt_region, cmp.alt_postal_code, cmp.alt_country, cmp.atlas_company_id, cmp.email, cmp.tax_type_id, cmp.redistributor_ind, cmp.operator_request, cmp.early_payment_discount, cmp.vip, cmp.deduction_contact_email, cmp.is_unipro, cmp.is_golbon, cmp.is_ima, cmp.cross_ship_company_id, cmp.tpo_ind, cmp.auto_submit_eclaim, cmp.auto_approve_eclaim
  • Index Cond: (cmp.company_id = cagg.agg_company_id)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_bimbo_bakeries.company_type ct (cost=0.13..0.15 rows=1 width=20) (never executed)

  • Output: ct.company_type_id, ct.client_id, ct.company_type_description, ct.company_type_cd, ct.active_ind, ct.internal_company_type
  • Index Cond: (ct.company_type_id = cmp.company_type_id)
32. 0.000 0.037 ↓ 0.0 0 1

Subquery Scan on contractee_view_1 (cost=6,790.58..6,790.70 rows=7 width=32) (actual time=0.037..0.037 rows=0 loops=1)

  • Output: contractee_view_1.contract_id, contractee_view_1.company_id
  • Buffers: shared hit=2
33. 0.000 0.037 ↓ 0.0 0 1

Unique (cost=6,790.58..6,790.63 rows=7 width=36) (actual time=0.037..0.037 rows=0 loops=1)

  • Output: cav_1.contract_amend_version_id, cmp_1.company_id, ct_1.internal_company_type
  • Buffers: shared hit=2
34. 0.004 0.037 ↓ 0.0 0 1

Sort (cost=6,790.58..6,790.59 rows=7 width=36) (actual time=0.036..0.037 rows=0 loops=1)

  • Output: cav_1.contract_amend_version_id, cmp_1.company_id, ct_1.internal_company_type
  • Sort Key: cmp_1.company_id, ct_1.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2
35. 0.001 0.033 ↓ 0.0 0 1

Nested Loop (cost=4,731.78..6,790.48 rows=7 width=36) (actual time=0.033..0.033 rows=0 loops=1)

  • Output: cav_1.contract_amend_version_id, cmp_1.company_id, ct_1.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=2
36. 0.000 0.032 ↓ 0.0 0 1

Nested Loop (cost=4,731.64..6,789.32 rows=7 width=48) (actual time=0.032..0.032 rows=0 loops=1)

  • Output: cav_1.contract_amend_version_id, cmp_1.company_id, cmp_1.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
37. 0.001 0.032 ↓ 0.0 0 1

Nested Loop (cost=4,731.37..6,786.09 rows=7 width=32) (actual time=0.032..0.032 rows=0 loops=1)

  • Output: cav_1.contract_amend_version_id, cagg_1.agg_company_id
  • Buffers: shared hit=2
38. 0.000 0.031 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,731.23..6,783.79 rows=7 width=48) (actual time=0.031..0.031 rows=0 loops=1)

  • Output: c_1.contractee_company_id, cav_1.contract_amend_version_id, cg_43.company_id
  • Buffers: shared hit=2
39. 0.005 0.031 ↓ 0.0 0 1

Hash Right Join (cost=4,731.08..6,773.30 rows=1 width=48) (actual time=0.031..0.031 rows=0 loops=1)

  • Output: c_1.contractee_company_id, cav_1.contract_amend_version_id, groupings_list_1.grouping_id
  • Hash Cond: (groupings_list_1.original_grouping_id = c_1.contractee_grouping_id)
  • Buffers: shared hit=2
40. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_1 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_1.original_grouping_id, NULL::uuid, groupings_list_1.grouping_id, NULL::integer
41.          

CTE groupings_list

42. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

43. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_siggis_yogurt.grouping_company pg_1 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_1.grouping_id, pg_1.parent_grouping_id, pg_1.grouping_id, 0
44. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_1.original_grouping_id, cg_1.parent_grouping_id, cg_1.grouping_id, (gl_1.level + 1)
  • Hash Cond: (gl_1.grouping_id = cg_1.parent_grouping_id)
45. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_1 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_1.original_grouping_id, gl_1.parent_grouping_id, gl_1.grouping_id, gl_1.level
46. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_1.parent_grouping_id, cg_1.grouping_id
47. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_siggis_yogurt.grouping_company cg_1 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_1.parent_grouping_id, cg_1.grouping_id
  • Filter: cg_1.active_ind
48. 0.000 0.026 ↓ 0.0 0 1

Hash (cost=3.59..3.59 rows=1 width=48) (actual time=0.026..0.026 rows=0 loops=1)

  • Output: c_1.contractee_grouping_id, c_1.contractee_company_id, cav_1.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
49. 0.001 0.026 ↓ 0.0 0 1

Nested Loop (cost=1.80..3.59 rows=1 width=48) (actual time=0.026..0.026 rows=0 loops=1)

  • Output: c_1.contractee_grouping_id, c_1.contractee_company_id, cav_1.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
50. 0.005 0.025 ↓ 0.0 0 1

Hash Join (cost=1.66..3.30 rows=1 width=32) (actual time=0.025..0.025 rows=0 loops=1)

  • Output: crv_1.contract_family_id, cav_1.contract_amend_version_id
  • Inner Unique: true
  • Hash Cond: (crv_1.contract_renew_version_id = cav_1.contract_renew_version_id)
  • Buffers: shared hit=2
51. 0.007 0.007 ↑ 50.0 1 1

Seq Scan on client_siggis_yogurt.contract_renew_version crv_1 (cost=0.00..1.50 rows=50 width=32) (actual time=0.007..0.007 rows=1 loops=1)

  • Output: crv_1.contract_renew_version_id, crv_1.contract_family_id, crv_1.date_range, crv_1.create_timestamp, crv_1.dead, crv_1.renew_version
  • Buffers: shared hit=1
52. 0.000 0.013 ↓ 0.0 0 1

Hash (cost=1.65..1.65 rows=1 width=32) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: cav_1.contract_amend_version_id, cav_1.contract_renew_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
53. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on client_siggis_yogurt.contract_amend_version cav_1 (cost=0.00..1.65 rows=1 width=32) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: cav_1.contract_amend_version_id, cav_1.contract_renew_version_id
  • Filter: (cav_1.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 52
  • Buffers: shared hit=1
54. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_siggis_yogurt.contract_family c_1 (cost=0.14..0.28 rows=1 width=48) (never executed)

  • Output: c_1.contract_family_id, c_1.client_id, c_1.contractee_company_id, c_1.contractee_grouping_id, c_1.creator_id, c_1.contract_sequence, c_1.cost_basis_type, c_1.contract_type, c_1.contract_title, c_1.contract_template_id, c_1.payment_calendar_id, c_1.catch_all, c_1.accrual_quantity_source, c_1.import_contract_number, c_1.accrual_lumpsum_spread
  • Index Cond: (c_1.contract_family_id = crv_1.contract_family_id)
55. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_siggis_yogurt.company_grouping cg_43 (cost=0.15..10.42 rows=7 width=32) (never executed)

  • Output: cg_43.company_id, cg_43.grouping_id
  • Index Cond: (cg_43.grouping_id = groupings_list_1.grouping_id)
  • Heap Fetches: 0
56. 0.000 0.000 ↓ 0.0 0

Index Scan using company_agg_idx on client_siggis_yogurt.company_agg cagg_1 (cost=0.14..0.32 rows=1 width=32) (never executed)

  • Output: cagg_1.company_id, cagg_1.agg_company_id, cagg_1.parent_agg_company_id
  • Index Cond: (cagg_1.company_id = COALESCE(c_1.contractee_company_id, cg_43.company_id))
57. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_siggis_yogurt.company cmp_1 (cost=0.27..0.46 rows=1 width=32) (never executed)

  • Output: cmp_1.company_id, cmp_1.client_id, cmp_1.company_name, cmp_1.company_number, cmp_1.company_type_id, cmp_1.active_ind, cmp_1.address_1, cmp_1.address_2, cmp_1.address_3, cmp_1.address_4, cmp_1.city, cmp_1.region, cmp_1.postal_code, cmp_1.country, cmp_1.company_agg_id, cmp_1.deduction_interval, cmp_1.alt_address_active, cmp_1.alt_address_1, cmp_1.alt_address_2, cmp_1.alt_address_3, cmp_1.alt_address_4, cmp_1.alt_city, cmp_1.alt_region, cmp_1.alt_postal_code, cmp_1.alt_country, cmp_1.atlas_company_id, cmp_1.email, cmp_1.tax_type_id, cmp_1.redistributor_ind, cmp_1.operator_request, cmp_1.early_payment_discount, cmp_1.vip, cmp_1.deduction_contact_email, cmp_1.is_unipro, cmp_1.is_golbon, cmp_1.is_ima, cmp_1.cross_ship_company_id, cmp_1.tpo_ind, cmp_1.auto_submit_eclaim, cmp_1.auto_approve_eclaim
  • Index Cond: (cmp_1.company_id = cagg_1.agg_company_id)
58. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_siggis_yogurt.company_type ct_1 (cost=0.13..0.17 rows=1 width=20) (never executed)

  • Output: ct_1.company_type_id, ct_1.client_id, ct_1.company_type_description, ct_1.company_type_cd, ct_1.active_ind, ct_1.internal_company_type
  • Index Cond: (ct_1.company_type_id = cmp_1.company_type_id)
59. 0.000 0.106 ↓ 0.0 0 1

Subquery Scan on contractee_view_2 (cost=6,927.75..6,931.64 rows=80 width=32) (actual time=0.106..0.106 rows=0 loops=1)

  • Output: contractee_view_2.contract_id, contractee_view_2.company_id
  • Buffers: shared hit=4
60. 0.001 0.106 ↓ 0.0 0 1

Unique (cost=6,927.75..6,930.84 rows=80 width=36) (actual time=0.105..0.106 rows=0 loops=1)

  • Output: cav_2.contract_amend_version_id, cmp_2.company_id, ct_2.internal_company_type
  • Buffers: shared hit=4
61. 0.003 0.105 ↓ 0.0 0 1

Sort (cost=6,927.75..6,928.78 rows=412 width=36) (actual time=0.105..0.105 rows=0 loops=1)

  • Output: cav_2.contract_amend_version_id, cmp_2.company_id, ct_2.internal_company_type
  • Sort Key: cmp_2.company_id, ct_2.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=4
62. 0.005 0.102 ↓ 0.0 0 1

Hash Join (cost=4,779.90..6,909.86 rows=412 width=36) (actual time=0.101..0.102 rows=0 loops=1)

  • Output: cav_2.contract_amend_version_id, cmp_2.company_id, ct_2.internal_company_type
  • Hash Cond: (COALESCE(c_2.contractee_company_id, cg_44.company_id) = cagg_2.company_id)
  • Buffers: shared hit=4
63. 0.001 0.017 ↓ 0.0 0 1

Hash Left Join (cost=4,774.61..6,892.72 rows=2,060 width=48) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: c_2.contractee_company_id, cav_2.contract_amend_version_id, cg_44.company_id
  • Hash Cond: (groupings_list_2.grouping_id = cg_44.grouping_id)
  • Buffers: shared hit=1
64. 0.004 0.016 ↓ 0.0 0 1

Hash Right Join (cost=4,734.01..6,779.26 rows=303 width=48) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: c_2.contractee_company_id, cav_2.contract_amend_version_id, groupings_list_2.grouping_id
  • Hash Cond: (groupings_list_2.original_grouping_id = c_2.contractee_grouping_id)
  • Buffers: shared hit=1
65. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_2 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_2.original_grouping_id, NULL::uuid, groupings_list_2.grouping_id, NULL::integer
66.          

CTE groupings_list

67. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

68. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_caulipower.grouping_company pg_2 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_2.grouping_id, pg_2.parent_grouping_id, pg_2.grouping_id, 0
69. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_2.original_grouping_id, cg_2.parent_grouping_id, cg_2.grouping_id, (gl_2.level + 1)
  • Hash Cond: (gl_2.grouping_id = cg_2.parent_grouping_id)
70. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_2 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_2.original_grouping_id, gl_2.parent_grouping_id, gl_2.grouping_id, gl_2.level
71. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_2.parent_grouping_id, cg_2.grouping_id
72. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_caulipower.grouping_company cg_2 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_2.parent_grouping_id, cg_2.grouping_id
  • Filter: cg_2.active_ind
73. 0.001 0.012 ↓ 0.0 0 1

Hash (cost=6.53..6.53 rows=1 width=48) (actual time=0.012..0.012 rows=0 loops=1)

  • Output: c_2.contractee_grouping_id, c_2.contractee_company_id, cav_2.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
74. 0.000 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.44..6.53 rows=1 width=48) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: c_2.contractee_grouping_id, c_2.contractee_company_id, cav_2.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=1
75. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.30..6.34 rows=1 width=32) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: crv_2.contract_family_id, cav_2.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=1
76. 0.010 0.010 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_caulipower.contract_amend_version cav_2 (cost=0.15..3.17 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: cav_2.contract_amend_version_id, cav_2.contract_renew_version_id, cav_2.contract_state, cav_2.contract_amend_version_parent_id, cav_2.contract_name, cav_2.contact_name, cav_2.contact_email, cav_2.contact_phone, cav_2.create_timestamp, cav_2.amend_version
  • Index Cond: (cav_2.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=1
77. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_caulipower.contract_renew_version crv_2 (cost=0.15..3.17 rows=1 width=32) (never executed)

  • Output: crv_2.contract_renew_version_id, crv_2.contract_family_id, crv_2.date_range, crv_2.create_timestamp, crv_2.dead, crv_2.renew_version
  • Index Cond: (crv_2.contract_renew_version_id = cav_2.contract_renew_version_id)
78. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_caulipower.contract_family c_2 (cost=0.15..0.19 rows=1 width=48) (never executed)

  • Output: c_2.contract_family_id, c_2.client_id, c_2.contractee_company_id, c_2.contractee_grouping_id, c_2.creator_id, c_2.contract_sequence, c_2.cost_basis_type, c_2.contract_type, c_2.contract_title, c_2.contract_template_id, c_2.payment_calendar_id, c_2.catch_all, c_2.accrual_quantity_source, c_2.import_contract_number, c_2.accrual_lumpsum_spread
  • Index Cond: (c_2.contract_family_id = crv_2.contract_family_id)
79. 0.000 0.000 ↓ 0.0 0

Hash (cost=23.60..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_44.grouping_id, cg_44.company_id
80. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_caulipower.company_grouping cg_44 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_44.grouping_id, cg_44.company_id
81. 0.006 0.080 ↑ 1.0 40 1

Hash (cost=4.79..4.79 rows=40 width=36) (actual time=0.080..0.080 rows=40 loops=1)

  • Output: cagg_2.company_id, cmp_2.company_id, ct_2.internal_company_type
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=3
82. 0.016 0.074 ↑ 1.0 40 1

Hash Join (cost=2.94..4.79 rows=40 width=36) (actual time=0.052..0.074 rows=40 loops=1)

  • Output: cagg_2.company_id, cmp_2.company_id, ct_2.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_2.company_type_id = ct_2.company_type_id)
  • Buffers: shared hit=3
83. 0.022 0.048 ↑ 1.0 40 1

Hash Join (cost=1.90..3.42 rows=40 width=48) (actual time=0.035..0.048 rows=40 loops=1)

  • Output: cagg_2.company_id, cmp_2.company_id, cmp_2.company_type_id
  • Inner Unique: true
  • Hash Cond: (cagg_2.agg_company_id = cmp_2.company_id)
  • Buffers: shared hit=2
84. 0.008 0.008 ↑ 1.0 40 1

Seq Scan on client_caulipower.company_agg cagg_2 (cost=0.00..1.40 rows=40 width=32) (actual time=0.005..0.008 rows=40 loops=1)

  • Output: cagg_2.company_id, cagg_2.agg_company_id, cagg_2.parent_agg_company_id
  • Buffers: shared hit=1
85. 0.006 0.018 ↑ 1.0 40 1

Hash (cost=1.40..1.40 rows=40 width=32) (actual time=0.018..0.018 rows=40 loops=1)

  • Output: cmp_2.company_id, cmp_2.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
86. 0.012 0.012 ↑ 1.0 40 1

Seq Scan on client_caulipower.company cmp_2 (cost=0.00..1.40 rows=40 width=32) (actual time=0.006..0.012 rows=40 loops=1)

  • Output: cmp_2.company_id, cmp_2.company_type_id
  • Buffers: shared hit=1
87. 0.002 0.010 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=20) (actual time=0.010..0.010 rows=2 loops=1)

  • Output: ct_2.internal_company_type, ct_2.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
88. 0.008 0.008 ↑ 1.0 2 1

Seq Scan on client_caulipower.company_type ct_2 (cost=0.00..1.02 rows=2 width=20) (actual time=0.007..0.008 rows=2 loops=1)

  • Output: ct_2.internal_company_type, ct_2.company_type_id
  • Buffers: shared hit=1
89. 0.001 0.053 ↓ 0.0 0 1

Subquery Scan on contractee_view_3 (cost=7,175.38..7,274.56 rows=4,959 width=32) (actual time=0.053..0.053 rows=0 loops=1)

  • Output: contractee_view_3.contract_id, contractee_view_3.company_id
90. 0.043 0.052 ↓ 0.0 0 1

HashAggregate (cost=7,175.38..7,224.97 rows=4,959 width=36) (actual time=0.052..0.052 rows=0 loops=1)

  • Output: cav_3.contract_amend_version_id, cmp_3.company_id, ct_3.internal_company_type
  • Group Key: cav_3.contract_amend_version_id, cmp_3.company_id, ct_3.internal_company_type
91. 0.004 0.009 ↓ 0.0 0 1

Hash Join (cost=4,841.68..7,138.19 rows=4,959 width=36) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_3.contract_amend_version_id, cmp_3.company_id, ct_3.internal_company_type
  • Hash Cond: (COALESCE(c_3.contractee_company_id, cg_45.company_id) = cagg_3.company_id)
92. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=4,774.61..6,892.72 rows=2,060 width=48) (never executed)

  • Output: c_3.contractee_company_id, cav_3.contract_amend_version_id, cg_45.company_id
  • Hash Cond: (groupings_list_3.grouping_id = cg_45.grouping_id)
93. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=4,734.01..6,779.26 rows=303 width=48) (never executed)

  • Output: c_3.contractee_company_id, cav_3.contract_amend_version_id, groupings_list_3.grouping_id
  • Hash Cond: (groupings_list_3.original_grouping_id = c_3.contractee_grouping_id)
94. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_3 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_3.original_grouping_id, NULL::uuid, groupings_list_3.grouping_id, NULL::integer
95.          

CTE groupings_list

96. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

97. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_upfield_global.grouping_company pg_3 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_3.grouping_id, pg_3.parent_grouping_id, pg_3.grouping_id, 0
98. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_3.original_grouping_id, cg_3.parent_grouping_id, cg_3.grouping_id, (gl_3.level + 1)
  • Hash Cond: (gl_3.grouping_id = cg_3.parent_grouping_id)
99. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_3 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_3.original_grouping_id, gl_3.parent_grouping_id, gl_3.grouping_id, gl_3.level
100. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_3.parent_grouping_id, cg_3.grouping_id
101. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_upfield_global.grouping_company cg_3 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_3.parent_grouping_id, cg_3.grouping_id
  • Filter: cg_3.active_ind
102. 0.000 0.000 ↓ 0.0 0

Hash (cost=6.53..6.53 rows=1 width=48) (never executed)

  • Output: c_3.contractee_grouping_id, c_3.contractee_company_id, cav_3.contract_amend_version_id
103. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.44..6.53 rows=1 width=48) (never executed)

  • Output: c_3.contractee_grouping_id, c_3.contractee_company_id, cav_3.contract_amend_version_id
  • Inner Unique: true
104. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.30..6.34 rows=1 width=32) (never executed)

  • Output: crv_3.contract_family_id, cav_3.contract_amend_version_id
  • Inner Unique: true
105. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_amend_version_pkey on client_upfield_global.contract_amend_version cav_3 (cost=0.15..3.17 rows=1 width=32) (never executed)

  • Output: cav_3.contract_amend_version_id, cav_3.contract_renew_version_id, cav_3.contract_state, cav_3.contract_amend_version_parent_id, cav_3.contract_name, cav_3.contact_name, cav_3.contact_email, cav_3.contact_phone, cav_3.create_timestamp, cav_3.amend_version
  • Index Cond: (cav_3.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
106. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_upfield_global.contract_renew_version crv_3 (cost=0.15..3.17 rows=1 width=32) (never executed)

  • Output: crv_3.contract_renew_version_id, crv_3.contract_family_id, crv_3.date_range, crv_3.create_timestamp, crv_3.dead, crv_3.renew_version
  • Index Cond: (crv_3.contract_renew_version_id = cav_3.contract_renew_version_id)
107. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_upfield_global.contract_family c_3 (cost=0.15..0.19 rows=1 width=48) (never executed)

  • Output: c_3.contract_family_id, c_3.client_id, c_3.contractee_company_id, c_3.contractee_grouping_id, c_3.creator_id, c_3.contract_sequence, c_3.cost_basis_type, c_3.contract_type, c_3.contract_title, c_3.contract_template_id, c_3.payment_calendar_id, c_3.catch_all, c_3.accrual_quantity_source, c_3.import_contract_number, c_3.accrual_lumpsum_spread
  • Index Cond: (c_3.contract_family_id = crv_3.contract_family_id)
108. 0.000 0.000 ↓ 0.0 0

Hash (cost=23.60..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_45.grouping_id, cg_45.company_id
109. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_upfield_global.company_grouping cg_45 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_45.grouping_id, cg_45.company_id
110. 0.000 0.005 ↓ 0.0 0 1

Hash (cost=61.04..61.04 rows=482 width=36) (actual time=0.005..0.005 rows=0 loops=1)

  • Output: cagg_3.company_id, cmp_3.company_id, ct_3.internal_company_type
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
111. 0.001 0.005 ↓ 0.0 0 1

Hash Join (cost=36.20..61.04 rows=482 width=36) (actual time=0.005..0.005 rows=0 loops=1)

  • Output: cagg_3.company_id, cmp_3.company_id, ct_3.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_3.company_type_id = ct_3.company_type_id)
112. 0.001 0.004 ↓ 0.0 0 1

Hash Join (cost=12.03..35.59 rows=482 width=48) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: cagg_3.company_id, cmp_3.company_id, cmp_3.company_type_id
  • Inner Unique: true
  • Hash Cond: (cagg_3.agg_company_id = cmp_3.company_id)
113. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on client_upfield_global.company_agg cagg_3 (cost=0.00..20.70 rows=1,070 width=32) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: cagg_3.company_id, cagg_3.agg_company_id, cagg_3.parent_agg_company_id
114. 0.000 0.000 ↓ 0.0 0

Hash (cost=10.90..10.90 rows=90 width=32) (never executed)

  • Output: cmp_3.company_id, cmp_3.company_type_id
115. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_upfield_global.company cmp_3 (cost=0.00..10.90 rows=90 width=32) (never executed)

  • Output: cmp_3.company_id, cmp_3.company_type_id
116. 0.000 0.000 ↓ 0.0 0

Hash (cost=16.30..16.30 rows=630 width=20) (never executed)

  • Output: ct_3.internal_company_type, ct_3.company_type_id
117. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_upfield_global.company_type ct_3 (cost=0.00..16.30 rows=630 width=20) (never executed)

  • Output: ct_3.internal_company_type, ct_3.company_type_id
118. 0.000 0.072 ↓ 0.0 0 1

Subquery Scan on contractee_view_4 (cost=6,913.97..6,915.82 rows=38 width=32) (actual time=0.072..0.072 rows=0 loops=1)

  • Output: contractee_view_4.contract_id, contractee_view_4.company_id
  • Buffers: shared hit=4
119. 0.000 0.072 ↓ 0.0 0 1

Unique (cost=6,913.97..6,915.44 rows=38 width=36) (actual time=0.072..0.072 rows=0 loops=1)

  • Output: cav_4.contract_amend_version_id, cmp_4.company_id, ct_4.internal_company_type
  • Buffers: shared hit=4
120. 0.003 0.072 ↓ 0.0 0 1

Sort (cost=6,913.97..6,914.46 rows=196 width=36) (actual time=0.072..0.072 rows=0 loops=1)

  • Output: cav_4.contract_amend_version_id, cmp_4.company_id, ct_4.internal_company_type
  • Sort Key: cmp_4.company_id, ct_4.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=4
121. 0.004 0.069 ↓ 0.0 0 1

Hash Join (cost=4,778.71..6,906.51 rows=196 width=36) (actual time=0.069..0.069 rows=0 loops=1)

  • Output: cav_4.contract_amend_version_id, cmp_4.company_id, ct_4.internal_company_type
  • Hash Cond: (COALESCE(c_4.contractee_company_id, cg_46.company_id) = cagg_4.company_id)
  • Buffers: shared hit=4
122. 0.001 0.010 ↓ 0.0 0 1

Hash Left Join (cost=4,774.61..6,892.72 rows=2,060 width=48) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: c_4.contractee_company_id, cav_4.contract_amend_version_id, cg_46.company_id
  • Hash Cond: (groupings_list_4.grouping_id = cg_46.grouping_id)
  • Buffers: shared hit=1
123. 0.003 0.009 ↓ 0.0 0 1

Hash Right Join (cost=4,734.01..6,779.26 rows=303 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_4.contractee_company_id, cav_4.contract_amend_version_id, groupings_list_4.grouping_id
  • Hash Cond: (groupings_list_4.original_grouping_id = c_4.contractee_grouping_id)
  • Buffers: shared hit=1
124. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_4 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_4.original_grouping_id, NULL::uuid, groupings_list_4.grouping_id, NULL::integer
125.          

CTE groupings_list

126. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

127. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_purely_elizabeth.grouping_company pg_4 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_4.grouping_id, pg_4.parent_grouping_id, pg_4.grouping_id, 0
128. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_4.original_grouping_id, cg_4.parent_grouping_id, cg_4.grouping_id, (gl_4.level + 1)
  • Hash Cond: (gl_4.grouping_id = cg_4.parent_grouping_id)
129. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_4 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_4.original_grouping_id, gl_4.parent_grouping_id, gl_4.grouping_id, gl_4.level
130. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_4.parent_grouping_id, cg_4.grouping_id
131. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_purely_elizabeth.grouping_company cg_4 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_4.parent_grouping_id, cg_4.grouping_id
  • Filter: cg_4.active_ind
132. 0.001 0.006 ↓ 0.0 0 1

Hash (cost=6.53..6.53 rows=1 width=48) (actual time=0.006..0.006 rows=0 loops=1)

  • Output: c_4.contractee_grouping_id, c_4.contractee_company_id, cav_4.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
133. 0.000 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.44..6.53 rows=1 width=48) (actual time=0.005..0.005 rows=0 loops=1)

  • Output: c_4.contractee_grouping_id, c_4.contractee_company_id, cav_4.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=1
134. 0.001 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.30..6.34 rows=1 width=32) (actual time=0.005..0.005 rows=0 loops=1)

  • Output: crv_4.contract_family_id, cav_4.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=1
135. 0.004 0.004 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_purely_elizabeth.contract_amend_version cav_4 (cost=0.15..3.17 rows=1 width=32) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: cav_4.contract_amend_version_id, cav_4.contract_renew_version_id, cav_4.contract_state, cav_4.contract_amend_version_parent_id, cav_4.contract_name, cav_4.contact_name, cav_4.contact_email, cav_4.contact_phone, cav_4.create_timestamp, cav_4.amend_version
  • Index Cond: (cav_4.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=1
136. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_purely_elizabeth.contract_renew_version crv_4 (cost=0.15..3.17 rows=1 width=32) (never executed)

  • Output: crv_4.contract_renew_version_id, crv_4.contract_family_id, crv_4.date_range, crv_4.create_timestamp, crv_4.dead, crv_4.renew_version
  • Index Cond: (crv_4.contract_renew_version_id = cav_4.contract_renew_version_id)
137. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_purely_elizabeth.contract_family c_4 (cost=0.15..0.19 rows=1 width=48) (never executed)

  • Output: c_4.contract_family_id, c_4.client_id, c_4.contractee_company_id, c_4.contractee_grouping_id, c_4.creator_id, c_4.contract_sequence, c_4.cost_basis_type, c_4.contract_type, c_4.contract_title, c_4.contract_template_id, c_4.payment_calendar_id, c_4.catch_all, c_4.accrual_quantity_source, c_4.import_contract_number, c_4.accrual_lumpsum_spread
  • Index Cond: (c_4.contract_family_id = crv_4.contract_family_id)
138. 0.000 0.000 ↓ 0.0 0

Hash (cost=23.60..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_46.grouping_id, cg_46.company_id
139. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_purely_elizabeth.company_grouping cg_46 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_46.grouping_id, cg_46.company_id
140. 0.005 0.055 ↑ 1.0 19 1

Hash (cost=3.86..3.86 rows=19 width=36) (actual time=0.055..0.055 rows=19 loops=1)

  • Output: cagg_4.company_id, cmp_4.company_id, ct_4.internal_company_type
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=3
141. 0.009 0.050 ↑ 1.0 19 1

Hash Join (cost=2.50..3.86 rows=19 width=36) (actual time=0.039..0.050 rows=19 loops=1)

  • Output: cagg_4.company_id, cmp_4.company_id, ct_4.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_4.company_type_id = ct_4.company_type_id)
  • Buffers: shared hit=3
142. 0.012 0.031 ↑ 1.0 19 1

Hash Join (cost=1.43..2.68 rows=19 width=48) (actual time=0.024..0.031 rows=19 loops=1)

  • Output: cagg_4.company_id, cmp_4.company_id, cmp_4.company_type_id
  • Inner Unique: true
  • Hash Cond: (cagg_4.agg_company_id = cmp_4.company_id)
  • Buffers: shared hit=2
143. 0.005 0.005 ↑ 1.0 19 1

Seq Scan on client_purely_elizabeth.company_agg cagg_4 (cost=0.00..1.19 rows=19 width=32) (actual time=0.004..0.005 rows=19 loops=1)

  • Output: cagg_4.company_id, cagg_4.agg_company_id, cagg_4.parent_agg_company_id
  • Buffers: shared hit=1
144. 0.005 0.014 ↑ 1.0 19 1

Hash (cost=1.19..1.19 rows=19 width=32) (actual time=0.013..0.014 rows=19 loops=1)

  • Output: cmp_4.company_id, cmp_4.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
145. 0.009 0.009 ↑ 1.0 19 1

Seq Scan on client_purely_elizabeth.company cmp_4 (cost=0.00..1.19 rows=19 width=32) (actual time=0.006..0.009 rows=19 loops=1)

  • Output: cmp_4.company_id, cmp_4.company_type_id
  • Buffers: shared hit=1
146. 0.002 0.010 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=20) (actual time=0.010..0.010 rows=3 loops=1)

  • Output: ct_4.internal_company_type, ct_4.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
147. 0.008 0.008 ↑ 1.0 3 1

Seq Scan on client_purely_elizabeth.company_type ct_4 (cost=0.00..1.03 rows=3 width=20) (actual time=0.007..0.008 rows=3 loops=1)

  • Output: ct_4.internal_company_type, ct_4.company_type_id
  • Buffers: shared hit=1
148. 0.000 0.052 ↓ 0.0 0 1

Subquery Scan on contractee_view_5 (cost=7,175.38..7,274.56 rows=4,959 width=32) (actual time=0.052..0.052 rows=0 loops=1)

  • Output: contractee_view_5.contract_id, contractee_view_5.company_id
149. 0.044 0.052 ↓ 0.0 0 1

HashAggregate (cost=7,175.38..7,224.97 rows=4,959 width=36) (actual time=0.051..0.052 rows=0 loops=1)

  • Output: cav_5.contract_amend_version_id, cmp_5.company_id, ct_5.internal_company_type
  • Group Key: cav_5.contract_amend_version_id, cmp_5.company_id, ct_5.internal_company_type
150. 0.003 0.008 ↓ 0.0 0 1

Hash Join (cost=4,841.68..7,138.19 rows=4,959 width=36) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: cav_5.contract_amend_version_id, cmp_5.company_id, ct_5.internal_company_type
  • Hash Cond: (COALESCE(c_5.contractee_company_id, cg_47.company_id) = cagg_5.company_id)
151. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=4,774.61..6,892.72 rows=2,060 width=48) (never executed)

  • Output: c_5.contractee_company_id, cav_5.contract_amend_version_id, cg_47.company_id
  • Hash Cond: (groupings_list_5.grouping_id = cg_47.grouping_id)
152. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=4,734.01..6,779.26 rows=303 width=48) (never executed)

  • Output: c_5.contractee_company_id, cav_5.contract_amend_version_id, groupings_list_5.grouping_id
  • Hash Cond: (groupings_list_5.original_grouping_id = c_5.contractee_grouping_id)
153. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_5 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_5.original_grouping_id, NULL::uuid, groupings_list_5.grouping_id, NULL::integer
154.          

CTE groupings_list

155. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

156. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_love_good_fats.grouping_company pg_5 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_5.grouping_id, pg_5.parent_grouping_id, pg_5.grouping_id, 0
157. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_5.original_grouping_id, cg_5.parent_grouping_id, cg_5.grouping_id, (gl_5.level + 1)
  • Hash Cond: (gl_5.grouping_id = cg_5.parent_grouping_id)
158. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_5 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_5.original_grouping_id, gl_5.parent_grouping_id, gl_5.grouping_id, gl_5.level
159. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_5.parent_grouping_id, cg_5.grouping_id
160. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_love_good_fats.grouping_company cg_5 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_5.parent_grouping_id, cg_5.grouping_id
  • Filter: cg_5.active_ind
161. 0.000 0.000 ↓ 0.0 0

Hash (cost=6.53..6.53 rows=1 width=48) (never executed)

  • Output: c_5.contractee_grouping_id, c_5.contractee_company_id, cav_5.contract_amend_version_id
162. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.44..6.53 rows=1 width=48) (never executed)

  • Output: c_5.contractee_grouping_id, c_5.contractee_company_id, cav_5.contract_amend_version_id
  • Inner Unique: true
163. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.30..6.34 rows=1 width=32) (never executed)

  • Output: crv_5.contract_family_id, cav_5.contract_amend_version_id
  • Inner Unique: true
164. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_amend_version_pkey on client_love_good_fats.contract_amend_version cav_5 (cost=0.15..3.17 rows=1 width=32) (never executed)

  • Output: cav_5.contract_amend_version_id, cav_5.contract_renew_version_id, cav_5.contract_state, cav_5.contract_amend_version_parent_id, cav_5.contract_name, cav_5.contact_name, cav_5.contact_email, cav_5.contact_phone, cav_5.create_timestamp, cav_5.amend_version
  • Index Cond: (cav_5.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
165. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_love_good_fats.contract_renew_version crv_5 (cost=0.15..3.17 rows=1 width=32) (never executed)

  • Output: crv_5.contract_renew_version_id, crv_5.contract_family_id, crv_5.date_range, crv_5.create_timestamp, crv_5.dead, crv_5.renew_version
  • Index Cond: (crv_5.contract_renew_version_id = cav_5.contract_renew_version_id)
166. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_love_good_fats.contract_family c_5 (cost=0.15..0.19 rows=1 width=48) (never executed)

  • Output: c_5.contract_family_id, c_5.client_id, c_5.contractee_company_id, c_5.contractee_grouping_id, c_5.creator_id, c_5.contract_sequence, c_5.cost_basis_type, c_5.contract_type, c_5.contract_title, c_5.contract_template_id, c_5.payment_calendar_id, c_5.catch_all, c_5.accrual_quantity_source, c_5.import_contract_number, c_5.accrual_lumpsum_spread
  • Index Cond: (c_5.contract_family_id = crv_5.contract_family_id)
167. 0.000 0.000 ↓ 0.0 0

Hash (cost=23.60..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_47.grouping_id, cg_47.company_id
168. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_love_good_fats.company_grouping cg_47 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

  • Output: cg_47.grouping_id, cg_47.company_id
169. 0.001 0.005 ↓ 0.0 0 1

Hash (cost=61.04..61.04 rows=482 width=36) (actual time=0.004..0.005 rows=0 loops=1)

  • Output: cagg_5.company_id, cmp_5.company_id, ct_5.internal_company_type
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
170. 0.001 0.004 ↓ 0.0 0 1

Hash Join (cost=36.20..61.04 rows=482 width=36) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: cagg_5.company_id, cmp_5.company_id, ct_5.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_5.company_type_id = ct_5.company_type_id)
171. 0.000 0.003 ↓ 0.0 0 1

Hash Join (cost=12.03..35.59 rows=482 width=48) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: cagg_5.company_id, cmp_5.company_id, cmp_5.company_type_id
  • Inner Unique: true
  • Hash Cond: (cagg_5.agg_company_id = cmp_5.company_id)
172. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on client_love_good_fats.company_agg cagg_5 (cost=0.00..20.70 rows=1,070 width=32) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: cagg_5.company_id, cagg_5.agg_company_id, cagg_5.parent_agg_company_id
173. 0.000 0.000 ↓ 0.0 0

Hash (cost=10.90..10.90 rows=90 width=32) (never executed)

  • Output: cmp_5.company_id, cmp_5.company_type_id
174. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_love_good_fats.company cmp_5 (cost=0.00..10.90 rows=90 width=32) (never executed)

  • Output: cmp_5.company_id, cmp_5.company_type_id
175. 0.000 0.000 ↓ 0.0 0

Hash (cost=16.30..16.30 rows=630 width=20) (never executed)

  • Output: ct_5.internal_company_type, ct_5.company_type_id
176. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_love_good_fats.company_type ct_5 (cost=0.00..16.30 rows=630 width=20) (never executed)

  • Output: ct_5.internal_company_type, ct_5.company_type_id
177. 0.001 0.041 ↓ 0.0 0 1

Subquery Scan on contractee_view_6 (cost=6,786.41..6,786.43 rows=1 width=32) (actual time=0.041..0.041 rows=0 loops=1)

  • Output: contractee_view_6.contract_id, contractee_view_6.company_id
  • Buffers: shared hit=3
178. 0.000 0.040 ↓ 0.0 0 1

Unique (cost=6,786.41..6,786.42 rows=1 width=36) (actual time=0.040..0.040 rows=0 loops=1)

  • Output: cav_6.contract_amend_version_id, cmp_6.company_id, ct_6.internal_company_type
  • Buffers: shared hit=3
179. 0.002 0.040 ↓ 0.0 0 1

Sort (cost=6,786.41..6,786.42 rows=1 width=36) (actual time=0.040..0.040 rows=0 loops=1)

  • Output: cav_6.contract_amend_version_id, cmp_6.company_id, ct_6.internal_company_type
  • Sort Key: cmp_6.company_id, ct_6.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
180. 0.001 0.038 ↓ 0.0 0 1

Nested Loop (cost=4,731.67..6,786.40 rows=1 width=36) (actual time=0.037..0.038 rows=0 loops=1)

  • Output: cav_6.contract_amend_version_id, cmp_6.company_id, ct_6.internal_company_type
  • Inner Unique: true
  • Join Filter: (cmp_6.company_type_id = ct_6.company_type_id)
  • Buffers: shared hit=3
181. 0.001 0.037 ↓ 0.0 0 1

Nested Loop (cost=4,731.67..6,785.34 rows=1 width=48) (actual time=0.037..0.037 rows=0 loops=1)

  • Output: cav_6.contract_amend_version_id, cmp_6.company_id, cmp_6.company_type_id
  • Inner Unique: true
  • Join Filter: (cagg_6.agg_company_id = cmp_6.company_id)
  • Buffers: shared hit=3
182. 0.003 0.036 ↓ 0.0 0 1

Hash Join (cost=4,731.67..6,784.27 rows=1 width=32) (actual time=0.036..0.036 rows=0 loops=1)

  • Output: cav_6.contract_amend_version_id, cagg_6.agg_company_id
  • Hash Cond: (COALESCE(c_6.contractee_company_id, cg_48.company_id) = cagg_6.company_id)
  • Buffers: shared hit=3
183. 0.001 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,730.60..6,783.17 rows=7 width=48) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: c_6.contractee_company_id, cav_6.contract_amend_version_id, cg_48.company_id
  • Buffers: shared hit=2
184. 0.004 0.023 ↓ 0.0 0 1

Hash Right Join (cost=4,730.45..6,772.67 rows=1 width=48) (actual time=0.023..0.023 rows=0 loops=1)

  • Output: c_6.contractee_company_id, cav_6.contract_amend_version_id, groupings_list_6.grouping_id
  • Hash Cond: (groupings_list_6.original_grouping_id = c_6.contractee_grouping_id)
  • Buffers: shared hit=2
185. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_6 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_6.original_grouping_id, NULL::uuid, groupings_list_6.grouping_id, NULL::integer
186.          

CTE groupings_list

187. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

188. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_tpmtpo_test.grouping_company pg_6 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_6.grouping_id, pg_6.parent_grouping_id, pg_6.grouping_id, 0
189. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_6.original_grouping_id, cg_6.parent_grouping_id, cg_6.grouping_id, (gl_6.level + 1)
  • Hash Cond: (gl_6.grouping_id = cg_6.parent_grouping_id)
190. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_6 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_6.original_grouping_id, gl_6.parent_grouping_id, gl_6.grouping_id, gl_6.level
191. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_6.parent_grouping_id, cg_6.grouping_id
192. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_tpmtpo_test.grouping_company cg_6 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_6.parent_grouping_id, cg_6.grouping_id
  • Filter: cg_6.active_ind
193. 0.000 0.019 ↓ 0.0 0 1

Hash (cost=2.96..2.96 rows=1 width=48) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: c_6.contractee_grouping_id, c_6.contractee_company_id, cav_6.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
194. 0.001 0.019 ↓ 0.0 0 1

Nested Loop (cost=1.27..2.96 rows=1 width=48) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: c_6.contractee_grouping_id, c_6.contractee_company_id, cav_6.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
195. 0.004 0.018 ↓ 0.0 0 1

Hash Join (cost=1.14..2.27 rows=1 width=32) (actual time=0.018..0.018 rows=0 loops=1)

  • Output: crv_6.contract_family_id, cav_6.contract_amend_version_id
  • Inner Unique: true
  • Hash Cond: (crv_6.contract_renew_version_id = cav_6.contract_renew_version_id)
  • Buffers: shared hit=2
196. 0.006 0.006 ↑ 10.0 1 1

Seq Scan on client_tpmtpo_test.contract_renew_version crv_6 (cost=0.00..1.10 rows=10 width=32) (actual time=0.006..0.006 rows=1 loops=1)

  • Output: crv_6.contract_renew_version_id, crv_6.contract_family_id, crv_6.date_range, crv_6.create_timestamp, crv_6.dead, crv_6.renew_version
  • Buffers: shared hit=1
197. 0.000 0.008 ↓ 0.0 0 1

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

  • Output: cav_6.contract_amend_version_id, cav_6.contract_renew_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
198. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on client_tpmtpo_test.contract_amend_version cav_6 (cost=0.00..1.12 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: cav_6.contract_amend_version_id, cav_6.contract_renew_version_id
  • Filter: (cav_6.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 10
  • Buffers: shared hit=1
199. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_tpmtpo_test.contract_family c_6 (cost=0.14..0.60 rows=1 width=48) (never executed)

  • Output: c_6.contract_family_id, c_6.client_id, c_6.contractee_company_id, c_6.contractee_grouping_id, c_6.creator_id, c_6.contract_sequence, c_6.cost_basis_type, c_6.contract_type, c_6.contract_title, c_6.contract_template_id, c_6.payment_calendar_id, c_6.catch_all, c_6.accrual_quantity_source, c_6.import_contract_number, c_6.accrual_lumpsum_spread
  • Index Cond: (c_6.contract_family_id = crv_6.contract_family_id)
200. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_tpmtpo_test.company_grouping cg_48 (cost=0.15..10.42 rows=7 width=32) (never executed)

  • Output: cg_48.company_id, cg_48.grouping_id
  • Index Cond: (cg_48.grouping_id = groupings_list_6.grouping_id)
  • Heap Fetches: 0
201. 0.002 0.009 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=32) (actual time=0.009..0.009 rows=3 loops=1)

  • Output: cagg_6.company_id, cagg_6.agg_company_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
202. 0.007 0.007 ↑ 1.0 3 1

Seq Scan on client_tpmtpo_test.company_agg cagg_6 (cost=0.00..1.03 rows=3 width=32) (actual time=0.006..0.007 rows=3 loops=1)

  • Output: cagg_6.company_id, cagg_6.agg_company_id
  • Buffers: shared hit=1
203. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_tpmtpo_test.company cmp_6 (cost=0.00..1.03 rows=3 width=32) (never executed)

  • Output: cmp_6.company_id, cmp_6.client_id, cmp_6.company_name, cmp_6.company_number, cmp_6.company_type_id, cmp_6.active_ind, cmp_6.address_1, cmp_6.address_2, cmp_6.address_3, cmp_6.address_4, cmp_6.city, cmp_6.region, cmp_6.postal_code, cmp_6.country, cmp_6.company_agg_id, cmp_6.deduction_interval, cmp_6.alt_address_active, cmp_6.alt_address_1, cmp_6.alt_address_2, cmp_6.alt_address_3, cmp_6.alt_address_4, cmp_6.alt_city, cmp_6.alt_region, cmp_6.alt_postal_code, cmp_6.alt_country, cmp_6.atlas_company_id, cmp_6.email, cmp_6.tax_type_id, cmp_6.redistributor_ind, cmp_6.operator_request, cmp_6.early_payment_discount, cmp_6.vip, cmp_6.deduction_contact_email, cmp_6.is_unipro, cmp_6.is_golbon, cmp_6.is_ima, cmp_6.cross_ship_company_id, cmp_6.tpo_ind, cmp_6.auto_submit_eclaim, cmp_6.auto_approve_eclaim
204. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_tpmtpo_test.company_type ct_6 (cost=0.00..1.03 rows=3 width=20) (never executed)

  • Output: ct_6.company_type_id, ct_6.client_id, ct_6.company_type_description, ct_6.company_type_cd, ct_6.active_ind, ct_6.internal_company_type
205. 0.000 0.039 ↓ 0.0 0 1

Subquery Scan on contractee_view_7 (cost=6,792.54..6,792.66 rows=7 width=32) (actual time=0.039..0.039 rows=0 loops=1)

  • Output: contractee_view_7.contract_id, contractee_view_7.company_id
  • Buffers: shared hit=3
206. 0.001 0.039 ↓ 0.0 0 1

Unique (cost=6,792.54..6,792.59 rows=7 width=36) (actual time=0.039..0.039 rows=0 loops=1)

  • Output: cav_7.contract_amend_version_id, cmp_7.company_id, ct_7.internal_company_type
  • Buffers: shared hit=3
207. 0.004 0.038 ↓ 0.0 0 1

Sort (cost=6,792.54..6,792.55 rows=7 width=36) (actual time=0.038..0.038 rows=0 loops=1)

  • Output: cav_7.contract_amend_version_id, cmp_7.company_id, ct_7.internal_company_type
  • Sort Key: cmp_7.company_id, ct_7.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
208. 0.003 0.034 ↓ 0.0 0 1

Nested Loop (cost=4,731.12..6,792.44 rows=7 width=36) (actual time=0.034..0.034 rows=0 loops=1)

  • Output: cav_7.contract_amend_version_id, cmp_7.company_id, ct_7.internal_company_type
  • Join Filter: (cmp_7.company_type_id = ct_7.company_type_id)
  • Buffers: shared hit=3
209. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on client_langer_juice.company_type ct_7 (cost=0.00..1.01 rows=1 width=20) (actual time=0.005..0.006 rows=1 loops=1)

  • Output: ct_7.company_type_id, ct_7.client_id, ct_7.company_type_description, ct_7.company_type_cd, ct_7.active_ind, ct_7.internal_company_type
  • Buffers: shared hit=1
210. 0.000 0.025 ↓ 0.0 0 1

Nested Loop (cost=4,731.12..6,791.34 rows=7 width=48) (actual time=0.025..0.025 rows=0 loops=1)

  • Output: cav_7.contract_amend_version_id, cmp_7.company_id, cmp_7.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
211. 0.001 0.025 ↓ 0.0 0 1

Nested Loop (cost=4,730.84..6,788.92 rows=7 width=32) (actual time=0.024..0.025 rows=0 loops=1)

  • Output: cav_7.contract_amend_version_id, cagg_7.agg_company_id
  • Buffers: shared hit=2
212. 0.000 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,730.57..6,783.13 rows=7 width=48) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: c_7.contractee_company_id, cav_7.contract_amend_version_id, cg_49.company_id
  • Buffers: shared hit=2
213. 0.004 0.024 ↓ 0.0 0 1

Hash Right Join (cost=4,730.42..6,772.64 rows=1 width=48) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: c_7.contractee_company_id, cav_7.contract_amend_version_id, groupings_list_7.grouping_id
  • Hash Cond: (groupings_list_7.original_grouping_id = c_7.contractee_grouping_id)
  • Buffers: shared hit=2
214. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_7 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_7.original_grouping_id, NULL::uuid, groupings_list_7.grouping_id, NULL::integer
215.          

CTE groupings_list

216. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

217. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_langer_juice.grouping_company pg_7 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_7.grouping_id, pg_7.parent_grouping_id, pg_7.grouping_id, 0
218. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_7.original_grouping_id, cg_7.parent_grouping_id, cg_7.grouping_id, (gl_7.level + 1)
  • Hash Cond: (gl_7.grouping_id = cg_7.parent_grouping_id)
219. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_7 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_7.original_grouping_id, gl_7.parent_grouping_id, gl_7.grouping_id, gl_7.level
220. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_7.parent_grouping_id, cg_7.grouping_id
221. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_langer_juice.grouping_company cg_7 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_7.parent_grouping_id, cg_7.grouping_id
  • Filter: cg_7.active_ind
222. 0.001 0.020 ↓ 0.0 0 1

Hash (cost=2.93..2.93 rows=1 width=48) (actual time=0.020..0.020 rows=0 loops=1)

  • Output: c_7.contractee_grouping_id, c_7.contractee_company_id, cav_7.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
223. 0.000 0.019 ↓ 0.0 0 1

Nested Loop (cost=1.40..2.93 rows=1 width=48) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: c_7.contractee_grouping_id, c_7.contractee_company_id, cav_7.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
224. 0.005 0.019 ↓ 0.0 0 1

Hash Join (cost=1.26..2.53 rows=1 width=32) (actual time=0.018..0.019 rows=0 loops=1)

  • Output: crv_7.contract_family_id, cav_7.contract_amend_version_id
  • Inner Unique: true
  • Hash Cond: (crv_7.contract_renew_version_id = cav_7.contract_renew_version_id)
  • Buffers: shared hit=2
225. 0.006 0.006 ↑ 20.0 1 1

Seq Scan on client_langer_juice.contract_renew_version crv_7 (cost=0.00..1.20 rows=20 width=32) (actual time=0.006..0.006 rows=1 loops=1)

  • Output: crv_7.contract_renew_version_id, crv_7.contract_family_id, crv_7.date_range, crv_7.create_timestamp, crv_7.dead, crv_7.renew_version
  • Buffers: shared hit=1
226. 0.000 0.008 ↓ 0.0 0 1

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

  • Output: cav_7.contract_amend_version_id, cav_7.contract_renew_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
227. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on client_langer_juice.contract_amend_version cav_7 (cost=0.00..1.25 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: cav_7.contract_amend_version_id, cav_7.contract_renew_version_id
  • Filter: (cav_7.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 20
  • Buffers: shared hit=1
228. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_langer_juice.contract_family c_7 (cost=0.14..0.38 rows=1 width=48) (never executed)

  • Output: c_7.contract_family_id, c_7.client_id, c_7.contractee_company_id, c_7.contractee_grouping_id, c_7.creator_id, c_7.contract_sequence, c_7.cost_basis_type, c_7.contract_type, c_7.contract_title, c_7.contract_template_id, c_7.payment_calendar_id, c_7.catch_all, c_7.accrual_quantity_source, c_7.import_contract_number, c_7.accrual_lumpsum_spread
  • Index Cond: (c_7.contract_family_id = crv_7.contract_family_id)
229. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_langer_juice.company_grouping cg_49 (cost=0.15..10.42 rows=7 width=32) (never executed)

  • Output: cg_49.company_id, cg_49.grouping_id
  • Index Cond: (cg_49.grouping_id = groupings_list_7.grouping_id)
  • Heap Fetches: 0
230. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_langer_juice.company_agg cagg_7 (cost=0.28..0.82 rows=1 width=32) (never executed)

  • Output: cagg_7.company_id, cagg_7.agg_company_id
  • Index Cond: (cagg_7.company_id = COALESCE(c_7.contractee_company_id, cg_49.company_id))
  • Heap Fetches: 0
231. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_langer_juice.company cmp_7 (cost=0.28..0.35 rows=1 width=32) (never executed)

  • Output: cmp_7.company_id, cmp_7.client_id, cmp_7.company_name, cmp_7.company_number, cmp_7.company_type_id, cmp_7.active_ind, cmp_7.address_1, cmp_7.address_2, cmp_7.address_3, cmp_7.address_4, cmp_7.city, cmp_7.region, cmp_7.postal_code, cmp_7.country, cmp_7.company_agg_id, cmp_7.deduction_interval, cmp_7.alt_address_active, cmp_7.alt_address_1, cmp_7.alt_address_2, cmp_7.alt_address_3, cmp_7.alt_address_4, cmp_7.alt_city, cmp_7.alt_region, cmp_7.alt_postal_code, cmp_7.alt_country, cmp_7.atlas_company_id, cmp_7.email, cmp_7.tax_type_id, cmp_7.redistributor_ind, cmp_7.operator_request, cmp_7.early_payment_discount, cmp_7.vip, cmp_7.deduction_contact_email, cmp_7.is_unipro, cmp_7.is_golbon, cmp_7.is_ima, cmp_7.cross_ship_company_id, cmp_7.tpo_ind, cmp_7.auto_submit_eclaim, cmp_7.auto_approve_eclaim
  • Index Cond: (cmp_7.company_id = cagg_7.agg_company_id)
232. 0.001 0.021 ↓ 0.0 0 1

Subquery Scan on contractee_view_8 (cost=260.95..260.97 rows=1 width=32) (actual time=0.020..0.021 rows=0 loops=1)

  • Output: contractee_view_8.contract_id, contractee_view_8.company_id
  • Buffers: shared hit=2
233. 0.001 0.020 ↓ 0.0 0 1

Unique (cost=260.95..260.96 rows=1 width=36) (actual time=0.020..0.020 rows=0 loops=1)

  • Output: cav_8.contract_amend_version_id, cmp_8.company_id, ct_8.internal_company_type
  • Buffers: shared hit=2
234. 0.003 0.019 ↓ 0.0 0 1

Sort (cost=260.95..260.95 rows=1 width=36) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: cav_8.contract_amend_version_id, cmp_8.company_id, ct_8.internal_company_type
  • Sort Key: cmp_8.company_id, ct_8.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2
235. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=229.09..260.94 rows=1 width=36) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: cav_8.contract_amend_version_id, cmp_8.company_id, ct_8.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=2
236. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=228.95..260.76 rows=1 width=48) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: cav_8.contract_amend_version_id, cmp_8.company_id, cmp_8.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
237. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=228.81..260.55 rows=1 width=32) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: cav_8.contract_amend_version_id, cagg_8.agg_company_id
  • Buffers: shared hit=2
238. 0.000 0.015 ↓ 0.0 0 1

Nested Loop Left Join (cost=228.66..260.34 rows=1 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: c_8.contractee_company_id, cav_8.contract_amend_version_id, cg_50.company_id
  • Buffers: shared hit=2
239. 0.004 0.015 ↓ 0.0 0 1

Hash Right Join (cost=228.52..258.77 rows=1 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: c_8.contractee_company_id, cav_8.contract_amend_version_id, groupings_list_8.grouping_id
  • Hash Cond: (groupings_list_8.original_grouping_id = c_8.contractee_grouping_id)
  • Buffers: shared hit=2
240. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_8 (cost=221.70..239.62 rows=896 width=52) (never executed)

  • Output: groupings_list_8.original_grouping_id, NULL::uuid, groupings_list_8.grouping_id, NULL::integer
241.          

CTE groupings_list

242. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..221.70 rows=896 width=52) (never executed)

243. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_demo.grouping_company pg_8 (cost=0.00..1.46 rows=46 width=52) (never executed)

  • Output: pg_8.grouping_id, pg_8.parent_grouping_id, pg_8.grouping_id, 0
244. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=14.95..20.23 rows=85 width=52) (never executed)

  • Output: gl_8.original_grouping_id, cg_8.parent_grouping_id, cg_8.grouping_id, (gl_8.level + 1)
  • Hash Cond: (cg_8.parent_grouping_id = gl_8.grouping_id)
245. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_demo.grouping_company cg_8 (cost=0.00..1.46 rows=46 width=32) (never executed)

  • Output: cg_8.grouping_id, cg_8.client_id, cg_8.grouping_description, cg_8.grouping_cd, cg_8.grouping_type, cg_8.parent_grouping_id, cg_8.active_ind, cg_8.company_type_id, cg_8.grouping_company_type
  • Filter: cg_8.active_ind
246. 0.000 0.000 ↓ 0.0 0

Hash (cost=9.20..9.20 rows=460 width=36) (never executed)

  • Output: gl_8.original_grouping_id, gl_8.level, gl_8.grouping_id
247. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_8 (cost=0.00..9.20 rows=460 width=36) (never executed)

  • Output: gl_8.original_grouping_id, gl_8.level, gl_8.grouping_id
248. 0.000 0.011 ↓ 0.0 0 1

Hash (cost=6.80..6.80 rows=1 width=48) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: c_8.contractee_grouping_id, c_8.contractee_company_id, cav_8.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
249. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.69..6.80 rows=1 width=48) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: c_8.contractee_grouping_id, c_8.contractee_company_id, cav_8.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
250. 0.000 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.54..6.60 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: crv_8.contract_family_id, cav_8.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
251. 0.010 0.010 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_demo.contract_amend_version cav_8 (cost=0.27..3.29 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: cav_8.contract_amend_version_id, cav_8.contract_renew_version_id, cav_8.contract_state, cav_8.contract_amend_version_parent_id, cav_8.contract_name, cav_8.contact_name, cav_8.contact_email, cav_8.contact_phone, cav_8.create_timestamp, cav_8.amend_version
  • Index Cond: (cav_8.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
252. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_version_pkey on client_demo.contract_renew_version crv_8 (cost=0.27..3.29 rows=1 width=32) (never executed)

  • Output: crv_8.contract_renew_version_id, crv_8.contract_family_id, crv_8.date_range, crv_8.create_timestamp, crv_8.dead, crv_8.renew_version
  • Index Cond: (crv_8.contract_renew_version_id = cav_8.contract_renew_version_id)
253. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_demo.contract_family c_8 (cost=0.14..0.20 rows=1 width=48) (never executed)

  • Output: c_8.contract_family_id, c_8.client_id, c_8.contractee_company_id, c_8.contractee_grouping_id, c_8.creator_id, c_8.contract_sequence, c_8.cost_basis_type, c_8.contract_type, c_8.contract_title, c_8.contract_template_id, c_8.payment_calendar_id, c_8.catch_all, c_8.accrual_quantity_source, c_8.import_contract_number, c_8.accrual_lumpsum_spread
  • Index Cond: (c_8.contract_family_id = crv_8.contract_family_id)
254. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_demo.company_grouping cg_50 (cost=0.14..1.47 rows=10 width=32) (never executed)

  • Output: cg_50.company_id, cg_50.grouping_id
  • Index Cond: (cg_50.grouping_id = groupings_list_8.grouping_id)
  • Heap Fetches: 0
255. 0.000 0.000 ↓ 0.0 0

Index Scan using company_agg_idx on client_demo.company_agg cagg_8 (cost=0.14..0.20 rows=1 width=32) (never executed)

  • Output: cagg_8.company_id, cagg_8.agg_company_id, cagg_8.parent_agg_company_id
  • Index Cond: (cagg_8.company_id = COALESCE(c_8.contractee_company_id, cg_50.company_id))
256. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_demo.company cmp_8 (cost=0.14..0.21 rows=1 width=32) (never executed)

  • Output: cmp_8.company_id, cmp_8.client_id, cmp_8.company_name, cmp_8.company_number, cmp_8.company_type_id, cmp_8.active_ind, cmp_8.address_1, cmp_8.address_2, cmp_8.address_3, cmp_8.address_4, cmp_8.city, cmp_8.region, cmp_8.postal_code, cmp_8.country, cmp_8.company_agg_id, cmp_8.deduction_interval, cmp_8.alt_address_active, cmp_8.alt_address_1, cmp_8.alt_address_2, cmp_8.alt_address_3, cmp_8.alt_address_4, cmp_8.alt_city, cmp_8.alt_region, cmp_8.alt_postal_code, cmp_8.alt_country, cmp_8.atlas_company_id, cmp_8.email, cmp_8.tax_type_id, cmp_8.redistributor_ind, cmp_8.operator_request, cmp_8.early_payment_discount, cmp_8.vip, cmp_8.deduction_contact_email, cmp_8.is_unipro, cmp_8.is_golbon, cmp_8.is_ima, cmp_8.cross_ship_company_id, cmp_8.tpo_ind, cmp_8.auto_submit_eclaim, cmp_8.auto_approve_eclaim
  • Index Cond: (cmp_8.company_id = cagg_8.agg_company_id)
257. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_demo.company_type ct_8 (cost=0.14..0.17 rows=1 width=20) (never executed)

  • Output: ct_8.company_type_id, ct_8.client_id, ct_8.company_type_description, ct_8.company_type_cd, ct_8.active_ind, ct_8.internal_company_type
  • Index Cond: (ct_8.company_type_id = cmp_8.company_type_id)
258. 0.001 0.015 ↓ 0.0 0 1

Subquery Scan on contractee_view_9 (cost=93.55..93.57 rows=1 width=32) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: contractee_view_9.contract_id, contractee_view_9.company_id
  • Buffers: shared hit=2
259. 0.000 0.014 ↓ 0.0 0 1

Unique (cost=93.55..93.56 rows=1 width=36) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_9.contract_amend_version_id, cmp_9.company_id, ct_9.internal_company_type
  • Buffers: shared hit=2
260. 0.004 0.014 ↓ 0.0 0 1

Sort (cost=93.55..93.55 rows=1 width=36) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_9.contract_amend_version_id, cmp_9.company_id, ct_9.internal_company_type
  • Sort Key: cmp_9.company_id, ct_9.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2
261. 0.000 0.010 ↓ 0.0 0 1

Nested Loop (cost=82.74..93.54 rows=1 width=36) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: cav_9.contract_amend_version_id, cmp_9.company_id, ct_9.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=2
262. 0.001 0.010 ↓ 0.0 0 1

Nested Loop (cost=82.61..93.21 rows=1 width=48) (actual time=0.009..0.010 rows=0 loops=1)

  • Output: cav_9.contract_amend_version_id, cmp_9.company_id, cmp_9.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
263. 0.000 0.009 ↓ 0.0 0 1

Nested Loop (cost=82.47..92.91 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_9.contract_amend_version_id, cagg_9.agg_company_id
  • Buffers: shared hit=2
264. 0.001 0.009 ↓ 0.0 0 1

Nested Loop Left Join (cost=82.33..92.64 rows=1 width=48) (actual time=0.008..0.009 rows=0 loops=1)

  • Output: c_9.contractee_company_id, cav_9.contract_amend_version_id, cg_51.company_id
  • Buffers: shared hit=2
265. 0.001 0.008 ↓ 0.0 0 1

Nested Loop Left Join (cost=82.19..92.20 rows=1 width=48) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: c_9.contractee_company_id, cav_9.contract_amend_version_id, groupings_list_9.grouping_id
  • Join Filter: (groupings_list_9.original_grouping_id = c_9.contractee_grouping_id)
  • Buffers: shared hit=2
266. 0.000 0.007 ↓ 0.0 0 1

Nested Loop (cost=0.56..6.70 rows=1 width=48) (actual time=0.007..0.007 rows=0 loops=1)

  • Output: c_9.contractee_grouping_id, c_9.contractee_company_id, cav_9.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
267. 0.000 0.007 ↓ 0.0 0 1

Nested Loop (cost=0.42..6.49 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=1)

  • Output: crv_9.contract_family_id, cav_9.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
268. 0.007 0.007 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_test_client_1.contract_amend_version cav_9 (cost=0.27..3.29 rows=1 width=32) (actual time=0.006..0.007 rows=0 loops=1)

  • Output: cav_9.contract_amend_version_id, cav_9.contract_renew_version_id, cav_9.contract_state, cav_9.contract_amend_version_parent_id, cav_9.contract_name, cav_9.contact_name, cav_9.contact_email, cav_9.contact_phone, cav_9.create_timestamp, cav_9.amend_version
  • Index Cond: (cav_9.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
269. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_version_pkey on client_test_client_1.contract_renew_version crv_9 (cost=0.14..3.16 rows=1 width=32) (never executed)

  • Output: crv_9.contract_renew_version_id, crv_9.contract_family_id, crv_9.date_range, crv_9.create_timestamp, crv_9.dead, crv_9.renew_version
  • Index Cond: (crv_9.contract_renew_version_id = cav_9.contract_renew_version_id)
270. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_test_client_1.contract_family c_9 (cost=0.14..0.21 rows=1 width=48) (never executed)

  • Output: c_9.contract_family_id, c_9.client_id, c_9.contractee_company_id, c_9.contractee_grouping_id, c_9.creator_id, c_9.contract_sequence, c_9.cost_basis_type, c_9.contract_type, c_9.contract_title, c_9.contract_template_id, c_9.payment_calendar_id, c_9.catch_all, c_9.accrual_quantity_source, c_9.import_contract_number, c_9.accrual_lumpsum_spread
  • Index Cond: (c_9.contract_family_id = crv_9.contract_family_id)
271. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_9 (cost=81.63..83.45 rows=91 width=52) (never executed)

  • Output: groupings_list_9.original_grouping_id, NULL::uuid, groupings_list_9.grouping_id, NULL::integer
272.          

CTE groupings_list

273. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..81.63 rows=91 width=52) (never executed)

274. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_test_client_1.grouping_company pg_9 (cost=0.00..1.21 rows=21 width=52) (never executed)

  • Output: pg_9.grouping_id, pg_9.parent_grouping_id, pg_9.grouping_id, 0
275. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.47..7.86 rows=7 width=52) (never executed)

  • Output: gl_9.original_grouping_id, cg_9.parent_grouping_id, cg_9.grouping_id, (gl_9.level + 1)
  • Hash Cond: (gl_9.grouping_id = cg_9.parent_grouping_id)
276. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_9 (cost=0.00..4.20 rows=210 width=36) (never executed)

  • Output: gl_9.original_grouping_id, gl_9.parent_grouping_id, gl_9.grouping_id, gl_9.level
277. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.21..1.21 rows=21 width=32) (never executed)

  • Output: cg_9.parent_grouping_id, cg_9.grouping_id
278. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_test_client_1.grouping_company cg_9 (cost=0.00..1.21 rows=21 width=32) (never executed)

  • Output: cg_9.parent_grouping_id, cg_9.grouping_id
  • Filter: cg_9.active_ind
279. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_test_client_1.company_grouping cg_51 (cost=0.14..0.42 rows=2 width=32) (never executed)

  • Output: cg_51.company_id, cg_51.grouping_id
  • Index Cond: (cg_51.grouping_id = groupings_list_9.grouping_id)
  • Heap Fetches: 0
280. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_test_client_1.company_agg cagg_9 (cost=0.14..0.26 rows=1 width=32) (never executed)

  • Output: cagg_9.company_id, cagg_9.agg_company_id
  • Index Cond: (cagg_9.company_id = COALESCE(c_9.contractee_company_id, cg_51.company_id))
  • Heap Fetches: 0
281. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_test_client_1.company cmp_9 (cost=0.14..0.29 rows=1 width=32) (never executed)

  • Output: cmp_9.company_id, cmp_9.client_id, cmp_9.company_name, cmp_9.company_number, cmp_9.company_type_id, cmp_9.active_ind, cmp_9.address_1, cmp_9.address_2, cmp_9.address_3, cmp_9.address_4, cmp_9.city, cmp_9.region, cmp_9.postal_code, cmp_9.country, cmp_9.company_agg_id, cmp_9.deduction_interval, cmp_9.alt_address_active, cmp_9.alt_address_1, cmp_9.alt_address_2, cmp_9.alt_address_3, cmp_9.alt_address_4, cmp_9.alt_city, cmp_9.alt_region, cmp_9.alt_postal_code, cmp_9.alt_country, cmp_9.atlas_company_id, cmp_9.email, cmp_9.tax_type_id, cmp_9.redistributor_ind, cmp_9.operator_request, cmp_9.early_payment_discount, cmp_9.vip, cmp_9.deduction_contact_email, cmp_9.is_unipro, cmp_9.is_golbon, cmp_9.is_ima, cmp_9.cross_ship_company_id, cmp_9.tpo_ind, cmp_9.auto_submit_eclaim, cmp_9.auto_approve_eclaim
  • Index Cond: (cmp_9.company_id = cagg_9.agg_company_id)
282. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_test_client_1.company_type ct_9 (cost=0.13..0.29 rows=1 width=20) (never executed)

  • Output: ct_9.company_type_id, ct_9.client_id, ct_9.company_type_description, ct_9.company_type_cd, ct_9.active_ind, ct_9.internal_company_type
  • Index Cond: (ct_9.company_type_id = cmp_9.company_type_id)
283. 0.000 0.034 ↓ 0.0 0 1

Subquery Scan on contractee_view_10 (cost=749.29..752.01 rows=155 width=32) (actual time=0.034..0.034 rows=0 loops=1)

  • Output: contractee_view_10.contract_id, contractee_view_10.company_id
  • Buffers: shared hit=3
284. 0.001 0.034 ↓ 0.0 0 1

Unique (cost=749.29..750.46 rows=155 width=36) (actual time=0.034..0.034 rows=0 loops=1)

  • Output: cav_10.contract_amend_version_id, cmp_10.company_id, ct_10.internal_company_type
  • Buffers: shared hit=3
285. 0.004 0.033 ↓ 0.0 0 1

Sort (cost=749.29..749.68 rows=155 width=36) (actual time=0.033..0.033 rows=0 loops=1)

  • Output: cav_10.contract_amend_version_id, cmp_10.company_id, ct_10.internal_company_type
  • Sort Key: cmp_10.company_id, ct_10.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
286. 0.004 0.029 ↓ 0.0 0 1

Hash Join (cost=438.90..743.66 rows=155 width=36) (actual time=0.029..0.029 rows=0 loops=1)

  • Output: cav_10.contract_amend_version_id, cmp_10.company_id, ct_10.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_10.company_type_id = ct_10.company_type_id)
  • Buffers: shared hit=3
287. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=437.78..741.79 rows=155 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: cav_10.contract_amend_version_id, cmp_10.company_id, cmp_10.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
288. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=437.50..690.53 rows=156 width=32) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: cav_10.contract_amend_version_id, cagg_10.agg_company_id
  • Buffers: shared hit=2
289. 0.001 0.014 ↓ 0.0 0 1

Nested Loop Left Join (cost=437.22..619.71 rows=100 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: c_10.contractee_company_id, cav_10.contract_amend_version_id, cg_52.company_id
  • Buffers: shared hit=2
290. 0.004 0.013 ↓ 0.0 0 1

Hash Right Join (cost=436.80..456.76 rows=1 width=48) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: c_10.contractee_company_id, cav_10.contract_amend_version_id, groupings_list_10.grouping_id
  • Hash Cond: (groupings_list_10.original_grouping_id = c_10.contractee_grouping_id)
  • Buffers: shared hit=2
291. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_10 (cost=429.88..441.70 rows=591 width=52) (never executed)

  • Output: groupings_list_10.original_grouping_id, NULL::uuid, groupings_list_10.grouping_id, NULL::integer
292.          

CTE groupings_list

293. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..429.88 rows=591 width=52) (never executed)

294. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_mount_franklin_foods.grouping_company pg_10 (cost=0.00..23.41 rows=41 width=52) (never executed)

  • Output: pg_10.grouping_id, pg_10.parent_grouping_id, pg_10.grouping_id, 0
295. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.32..39.47 rows=55 width=52) (never executed)

  • Output: gl_10.original_grouping_id, cg_10.parent_grouping_id, cg_10.grouping_id, (gl_10.level + 1)
  • Hash Cond: (cg_10.parent_grouping_id = gl_10.grouping_id)
296. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_mount_franklin_foods.grouping_company cg_10 (cost=0.00..23.41 rows=38 width=32) (never executed)

  • Output: cg_10.grouping_id, cg_10.client_id, cg_10.grouping_description, cg_10.grouping_cd, cg_10.grouping_type, cg_10.parent_grouping_id, cg_10.active_ind, cg_10.company_type_id, cg_10.grouping_company_type
  • Filter: cg_10.active_ind
297. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.20..8.20 rows=410 width=36) (never executed)

  • Output: gl_10.original_grouping_id, gl_10.level, gl_10.grouping_id
298. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_10 (cost=0.00..8.20 rows=410 width=36) (never executed)

  • Output: gl_10.original_grouping_id, gl_10.level, gl_10.grouping_id
299. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=6.91..6.91 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_10.contractee_grouping_id, c_10.contractee_company_id, cav_10.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
300. 0.001 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.84..6.91 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_10.contractee_grouping_id, c_10.contractee_company_id, cav_10.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
301. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.56..6.60 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: crv_10.contract_family_id, cav_10.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
302. 0.008 0.008 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_mount_franklin_foods.contract_amend_version cav_10 (cost=0.28..3.30 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: cav_10.contract_amend_version_id, cav_10.contract_renew_version_id, cav_10.contract_state, cav_10.contract_amend_version_parent_id, cav_10.contract_name, cav_10.contact_name, cav_10.contact_email, cav_10.contact_phone, cav_10.create_timestamp, cav_10.amend_version
  • Index Cond: (cav_10.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
303. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_version_pkey on client_mount_franklin_foods.contract_renew_version crv_10 (cost=0.28..3.30 rows=1 width=32) (never executed)

  • Output: crv_10.contract_renew_version_id, crv_10.contract_family_id, crv_10.date_range, crv_10.create_timestamp, crv_10.dead, crv_10.renew_version
  • Index Cond: (crv_10.contract_renew_version_id = cav_10.contract_renew_version_id)
304. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_mount_franklin_foods.contract_family c_10 (cost=0.28..0.31 rows=1 width=48) (never executed)

  • Output: c_10.contract_family_id, c_10.client_id, c_10.contractee_company_id, c_10.contractee_grouping_id, c_10.creator_id, c_10.contract_sequence, c_10.cost_basis_type, c_10.contract_type, c_10.contract_title, c_10.contract_template_id, c_10.payment_calendar_id, c_10.catch_all, c_10.accrual_quantity_source, c_10.import_contract_number, c_10.accrual_lumpsum_spread
  • Index Cond: (c_10.contract_family_id = crv_10.contract_family_id)
305. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_mount_franklin_foods.company_grouping cg_52 (cost=0.41..157.22 rows=573 width=32) (never executed)

  • Output: cg_52.company_id, cg_52.grouping_id
  • Index Cond: (cg_52.grouping_id = groupings_list_10.grouping_id)
  • Heap Fetches: 0
306. 0.000 0.000 ↓ 0.0 0

Index Scan using company_agg_idx on client_mount_franklin_foods.company_agg cagg_10 (cost=0.29..0.69 rows=2 width=32) (never executed)

  • Output: cagg_10.company_id, cagg_10.agg_company_id, cagg_10.parent_agg_company_id
  • Index Cond: (cagg_10.company_id = COALESCE(c_10.contractee_company_id, cg_52.company_id))
307. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_mount_franklin_foods.company cmp_10 (cost=0.28..0.33 rows=1 width=32) (never executed)

  • Output: cmp_10.company_id, cmp_10.client_id, cmp_10.company_name, cmp_10.company_number, cmp_10.company_type_id, cmp_10.active_ind, cmp_10.address_1, cmp_10.address_2, cmp_10.address_3, cmp_10.address_4, cmp_10.city, cmp_10.region, cmp_10.postal_code, cmp_10.country, cmp_10.company_agg_id, cmp_10.deduction_interval, cmp_10.alt_address_active, cmp_10.alt_address_1, cmp_10.alt_address_2, cmp_10.alt_address_3, cmp_10.alt_address_4, cmp_10.alt_city, cmp_10.alt_region, cmp_10.alt_postal_code, cmp_10.alt_country, cmp_10.atlas_company_id, cmp_10.email, cmp_10.tax_type_id, cmp_10.redistributor_ind, cmp_10.operator_request, cmp_10.early_payment_discount, cmp_10.vip, cmp_10.deduction_contact_email, cmp_10.is_unipro, cmp_10.is_golbon, cmp_10.is_ima, cmp_10.cross_ship_company_id, cmp_10.tpo_ind, cmp_10.auto_submit_eclaim, cmp_10.auto_approve_eclaim
  • Index Cond: (cmp_10.company_id = cagg_10.agg_company_id)
308. 0.003 0.010 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=20) (actual time=0.009..0.010 rows=5 loops=1)

  • Output: ct_10.internal_company_type, ct_10.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
309. 0.007 0.007 ↑ 1.0 5 1

Seq Scan on client_mount_franklin_foods.company_type ct_10 (cost=0.00..1.05 rows=5 width=20) (actual time=0.006..0.007 rows=5 loops=1)

  • Output: ct_10.internal_company_type, ct_10.company_type_id
  • Buffers: shared hit=1
310. 0.001 0.050 ↓ 0.0 0 1

Subquery Scan on contractee_view_11 (cost=72.37..72.39 rows=1 width=32) (actual time=0.050..0.050 rows=0 loops=1)

  • Output: contractee_view_11.contract_id, contractee_view_11.company_id
  • Buffers: shared hit=4
311. 0.000 0.049 ↓ 0.0 0 1

Unique (cost=72.37..72.38 rows=1 width=36) (actual time=0.049..0.049 rows=0 loops=1)

  • Output: cav_11.contract_amend_version_id, cmp_11.company_id, ct_11.internal_company_type
  • Buffers: shared hit=4
312. 0.004 0.049 ↓ 0.0 0 1

Sort (cost=72.37..72.38 rows=1 width=36) (actual time=0.049..0.049 rows=0 loops=1)

  • Output: cav_11.contract_amend_version_id, cmp_11.company_id, ct_11.internal_company_type
  • Sort Key: cmp_11.company_id, ct_11.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=4
313. 0.000 0.045 ↓ 0.0 0 1

Nested Loop (cost=57.34..72.36 rows=1 width=36) (actual time=0.045..0.045 rows=0 loops=1)

  • Output: cav_11.contract_amend_version_id, cmp_11.company_id, ct_11.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=4
314. 0.001 0.045 ↓ 0.0 0 1

Nested Loop (cost=57.20..71.66 rows=1 width=48) (actual time=0.045..0.045 rows=0 loops=1)

  • Output: cav_11.contract_amend_version_id, cmp_11.company_id, cmp_11.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=4
315. 0.004 0.044 ↓ 0.0 0 1

Hash Join (cost=57.07..71.03 rows=1 width=32) (actual time=0.044..0.044 rows=0 loops=1)

  • Output: cav_11.contract_amend_version_id, cagg_11.agg_company_id
  • Hash Cond: (COALESCE(c_11.contractee_company_id, cg_53.company_id) = cagg_11.company_id)
  • Buffers: shared hit=4
316. 0.001 0.030 ↓ 0.0 0 1

Nested Loop Left Join (cost=55.82..69.74 rows=7 width=48) (actual time=0.030..0.030 rows=0 loops=1)

  • Output: c_11.contractee_company_id, cav_11.contract_amend_version_id, cg_53.company_id
  • Buffers: shared hit=3
317. 0.004 0.029 ↓ 0.0 0 1

Hash Right Join (cost=55.67..59.09 rows=1 width=48) (actual time=0.029..0.029 rows=0 loops=1)

  • Output: c_11.contractee_company_id, cav_11.contract_amend_version_id, groupings_list_11.grouping_id
  • Hash Cond: (groupings_list_11.original_grouping_id = c_11.contractee_grouping_id)
  • Buffers: shared hit=3
318. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_11 (cost=51.52..53.54 rows=101 width=52) (never executed)

  • Output: groupings_list_11.original_grouping_id, NULL::uuid, groupings_list_11.grouping_id, NULL::integer
319.          

CTE groupings_list

320. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..51.52 rows=101 width=52) (never executed)

321. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_norpac.grouping_company pg_11 (cost=0.00..1.11 rows=11 width=52) (never executed)

  • Output: pg_11.grouping_id, pg_11.parent_grouping_id, pg_11.grouping_id, 0
322. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=3.58..4.84 rows=9 width=52) (never executed)

  • Output: gl_11.original_grouping_id, cg_11.parent_grouping_id, cg_11.grouping_id, (gl_11.level + 1)
  • Hash Cond: (cg_11.parent_grouping_id = gl_11.grouping_id)
323. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_norpac.grouping_company cg_11 (cost=0.00..1.11 rows=11 width=32) (never executed)

  • Output: cg_11.grouping_id, cg_11.client_id, cg_11.grouping_description, cg_11.grouping_cd, cg_11.grouping_type, cg_11.parent_grouping_id, cg_11.active_ind, cg_11.company_type_id, cg_11.grouping_company_type
  • Filter: cg_11.active_ind
324. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.20..2.20 rows=110 width=36) (never executed)

  • Output: gl_11.original_grouping_id, gl_11.level, gl_11.grouping_id
325. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_11 (cost=0.00..2.20 rows=110 width=36) (never executed)

  • Output: gl_11.original_grouping_id, gl_11.level, gl_11.grouping_id
326. 0.001 0.025 ↓ 0.0 0 1

Hash (cost=4.14..4.14 rows=1 width=48) (actual time=0.025..0.025 rows=0 loops=1)

  • Output: c_11.contractee_grouping_id, c_11.contractee_company_id, cav_11.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=3
327. 0.000 0.024 ↓ 0.0 0 1

Nested Loop (cost=2.60..4.14 rows=1 width=48) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: c_11.contractee_grouping_id, c_11.contractee_company_id, cav_11.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=3
328. 0.005 0.024 ↓ 0.0 0 1

Hash Join (cost=2.46..3.76 rows=1 width=32) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: crv_11.contract_family_id, cav_11.contract_amend_version_id
  • Inner Unique: true
  • Hash Cond: (crv_11.contract_renew_version_id = cav_11.contract_renew_version_id)
  • Buffers: shared hit=3
329. 0.005 0.005 ↑ 23.0 1 1

Seq Scan on client_norpac.contract_renew_version crv_11 (cost=0.00..1.23 rows=23 width=32) (actual time=0.005..0.005 rows=1 loops=1)

  • Output: crv_11.contract_renew_version_id, crv_11.contract_family_id, crv_11.date_range, crv_11.create_timestamp, crv_11.dead, crv_11.renew_version
  • Buffers: shared hit=1
330. 0.000 0.014 ↓ 0.0 0 1

Hash (cost=2.45..2.45 rows=1 width=32) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_11.contract_amend_version_id, cav_11.contract_renew_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
331. 0.014 0.014 ↓ 0.0 0 1

Seq Scan on client_norpac.contract_amend_version cav_11 (cost=0.00..2.45 rows=1 width=32) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_11.contract_amend_version_id, cav_11.contract_renew_version_id
  • Filter: (cav_11.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 36
  • Buffers: shared hit=2
332. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_norpac.contract_family c_11 (cost=0.14..0.35 rows=1 width=48) (never executed)

  • Output: c_11.contract_family_id, c_11.client_id, c_11.contractee_company_id, c_11.contractee_grouping_id, c_11.creator_id, c_11.contract_sequence, c_11.cost_basis_type, c_11.contract_type, c_11.contract_title, c_11.contract_template_id, c_11.payment_calendar_id, c_11.catch_all, c_11.accrual_quantity_source, c_11.import_contract_number, c_11.accrual_lumpsum_spread
  • Index Cond: (c_11.contract_family_id = crv_11.contract_family_id)
333. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_norpac.company_grouping cg_53 (cost=0.15..10.59 rows=7 width=32) (never executed)

  • Output: cg_53.company_id, cg_53.grouping_id
  • Index Cond: (cg_53.grouping_id = groupings_list_11.grouping_id)
  • Heap Fetches: 0
334. 0.002 0.010 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=32) (actual time=0.010..0.010 rows=11 loops=1)

  • Output: cagg_11.company_id, cagg_11.agg_company_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
335. 0.008 0.008 ↑ 1.0 11 1

Seq Scan on client_norpac.company_agg cagg_11 (cost=0.00..1.11 rows=11 width=32) (actual time=0.006..0.008 rows=11 loops=1)

  • Output: cagg_11.company_id, cagg_11.agg_company_id
  • Buffers: shared hit=1
336. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_norpac.company cmp_11 (cost=0.14..0.56 rows=1 width=32) (never executed)

  • Output: cmp_11.company_id, cmp_11.client_id, cmp_11.company_name, cmp_11.company_number, cmp_11.company_type_id, cmp_11.active_ind, cmp_11.address_1, cmp_11.address_2, cmp_11.address_3, cmp_11.address_4, cmp_11.city, cmp_11.region, cmp_11.postal_code, cmp_11.country, cmp_11.company_agg_id, cmp_11.deduction_interval, cmp_11.alt_address_active, cmp_11.alt_address_1, cmp_11.alt_address_2, cmp_11.alt_address_3, cmp_11.alt_address_4, cmp_11.alt_city, cmp_11.alt_region, cmp_11.alt_postal_code, cmp_11.alt_country, cmp_11.atlas_company_id, cmp_11.email, cmp_11.tax_type_id, cmp_11.redistributor_ind, cmp_11.operator_request, cmp_11.early_payment_discount, cmp_11.vip, cmp_11.deduction_contact_email, cmp_11.is_unipro, cmp_11.is_golbon, cmp_11.is_ima, cmp_11.cross_ship_company_id, cmp_11.tpo_ind, cmp_11.auto_submit_eclaim, cmp_11.auto_approve_eclaim
  • Index Cond: (cmp_11.company_id = cagg_11.agg_company_id)
337. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_norpac.company_type ct_11 (cost=0.13..0.56 rows=1 width=20) (never executed)

  • Output: ct_11.company_type_id, ct_11.client_id, ct_11.company_type_description, ct_11.company_type_cd, ct_11.active_ind, ct_11.internal_company_type
  • Index Cond: (ct_11.company_type_id = cmp_11.company_type_id)
338. 0.000 0.052 ↓ 0.0 0 1

Subquery Scan on contractee_view_12 (cost=2,089.45..2,129.25 rows=1,990 width=32) (actual time=0.052..0.052 rows=0 loops=1)

  • Output: contractee_view_12.contract_id, contractee_view_12.company_id
  • Buffers: shared hit=3
339. 0.023 0.052 ↓ 0.0 0 1

HashAggregate (cost=2,089.45..2,109.35 rows=1,990 width=36) (actual time=0.052..0.052 rows=0 loops=1)

  • Output: cav_12.contract_amend_version_id, cmp_12.company_id, ct_12.internal_company_type
  • Group Key: cav_12.contract_amend_version_id, cmp_12.company_id, ct_12.internal_company_type
  • Buffers: shared hit=3
340. 0.005 0.029 ↓ 0.0 0 1

Hash Join (cost=855.36..2,074.52 rows=1,990 width=36) (actual time=0.029..0.029 rows=0 loops=1)

  • Output: cav_12.contract_amend_version_id, cmp_12.company_id, ct_12.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_12.company_type_id = ct_12.company_type_id)
  • Buffers: shared hit=3
341. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=854.29..2,060.85 rows=1,990 width=48) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: cav_12.contract_amend_version_id, cmp_12.company_id, cmp_12.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
342. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=854.00..1,432.05 rows=1,990 width=32) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: cav_12.contract_amend_version_id, cagg_12.agg_company_id
  • Buffers: shared hit=2
343. 0.000 0.014 ↓ 0.0 0 1

Nested Loop Left Join (cost=853.58..1,232.02 rows=193 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: c_12.contractee_company_id, cav_12.contract_amend_version_id, cg_54.company_id
  • Buffers: shared hit=2
344. 0.004 0.014 ↓ 0.0 0 1

Hash Right Join (cost=853.17..926.95 rows=1 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: c_12.contractee_company_id, cav_12.contract_amend_version_id, groupings_list_12.grouping_id
  • Hash Cond: (groupings_list_12.original_grouping_id = c_12.contractee_grouping_id)
  • Buffers: shared hit=2
345. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_12 (cost=846.23..889.95 rows=2,186 width=52) (never executed)

  • Output: groupings_list_12.original_grouping_id, NULL::uuid, groupings_list_12.grouping_id, NULL::integer
346.          

CTE groupings_list

347. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..846.23 rows=2,186 width=52) (never executed)

348. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_basic_american.grouping_company pg_12 (cost=0.00..39.86 rows=86 width=52) (never executed)

  • Output: pg_12.grouping_id, pg_12.parent_grouping_id, pg_12.grouping_id, 0
349. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=27.95..76.27 rows=210 width=52) (never executed)

  • Output: gl_12.original_grouping_id, cg_12.parent_grouping_id, cg_12.grouping_id, (gl_12.level + 1)
  • Hash Cond: (cg_12.parent_grouping_id = gl_12.grouping_id)
350. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_basic_american.grouping_company cg_12 (cost=0.00..39.86 rows=53 width=32) (never executed)

  • Output: cg_12.grouping_id, cg_12.client_id, cg_12.grouping_description, cg_12.grouping_cd, cg_12.grouping_type, cg_12.parent_grouping_id, cg_12.active_ind, cg_12.company_type_id, cg_12.grouping_company_type
  • Filter: cg_12.active_ind
351. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.20..17.20 rows=860 width=36) (never executed)

  • Output: gl_12.original_grouping_id, gl_12.level, gl_12.grouping_id
352. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_12 (cost=0.00..17.20 rows=860 width=36) (never executed)

  • Output: gl_12.original_grouping_id, gl_12.level, gl_12.grouping_id
353. 0.001 0.010 ↓ 0.0 0 1

Hash (cost=6.92..6.92 rows=1 width=48) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: c_12.contractee_grouping_id, c_12.contractee_company_id, cav_12.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
354. 0.001 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.85..6.92 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_12.contractee_grouping_id, c_12.contractee_company_id, cav_12.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
355. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.57..6.61 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: crv_12.contract_family_id, cav_12.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
356. 0.008 0.008 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_basic_american.contract_amend_version cav_12 (cost=0.29..3.31 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: cav_12.contract_amend_version_id, cav_12.contract_renew_version_id, cav_12.contract_state, cav_12.contract_amend_version_parent_id, cav_12.contract_name, cav_12.contact_name, cav_12.contact_email, cav_12.contact_phone, cav_12.create_timestamp, cav_12.amend_version
  • Index Cond: (cav_12.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
357. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_version_pkey on client_basic_american.contract_renew_version crv_12 (cost=0.29..3.30 rows=1 width=32) (never executed)

  • Output: crv_12.contract_renew_version_id, crv_12.contract_family_id, crv_12.date_range, crv_12.create_timestamp, crv_12.dead, crv_12.renew_version
  • Index Cond: (crv_12.contract_renew_version_id = cav_12.contract_renew_version_id)
358. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_basic_american.contract_family c_12 (cost=0.28..0.32 rows=1 width=48) (never executed)

  • Output: c_12.contract_family_id, c_12.client_id, c_12.contractee_company_id, c_12.contractee_grouping_id, c_12.creator_id, c_12.contract_sequence, c_12.cost_basis_type, c_12.contract_type, c_12.contract_title, c_12.contract_template_id, c_12.payment_calendar_id, c_12.catch_all, c_12.accrual_quantity_source, c_12.import_contract_number, c_12.accrual_lumpsum_spread
  • Index Cond: (c_12.contract_family_id = crv_12.contract_family_id)
359. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_basic_american.company_grouping cg_54 (cost=0.41..297.36 rows=770 width=32) (never executed)

  • Output: cg_54.company_id, cg_54.grouping_id
  • Index Cond: (cg_54.grouping_id = groupings_list_12.grouping_id)
  • Heap Fetches: 0
360. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_basic_american.company_agg cagg_12 (cost=0.42..0.94 rows=10 width=32) (never executed)

  • Output: cagg_12.company_id, cagg_12.agg_company_id
  • Index Cond: (cagg_12.company_id = COALESCE(c_12.contractee_company_id, cg_54.company_id))
  • Heap Fetches: 0
361. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_basic_american.company cmp_12 (cost=0.29..0.32 rows=1 width=32) (never executed)

  • Output: cmp_12.company_id, cmp_12.client_id, cmp_12.company_name, cmp_12.company_number, cmp_12.company_type_id, cmp_12.active_ind, cmp_12.address_1, cmp_12.address_2, cmp_12.address_3, cmp_12.address_4, cmp_12.city, cmp_12.region, cmp_12.postal_code, cmp_12.country, cmp_12.company_agg_id, cmp_12.deduction_interval, cmp_12.alt_address_active, cmp_12.alt_address_1, cmp_12.alt_address_2, cmp_12.alt_address_3, cmp_12.alt_address_4, cmp_12.alt_city, cmp_12.alt_region, cmp_12.alt_postal_code, cmp_12.alt_country, cmp_12.atlas_company_id, cmp_12.email, cmp_12.tax_type_id, cmp_12.redistributor_ind, cmp_12.operator_request, cmp_12.early_payment_discount, cmp_12.vip, cmp_12.deduction_contact_email, cmp_12.is_unipro, cmp_12.is_golbon, cmp_12.is_ima, cmp_12.cross_ship_company_id, cmp_12.tpo_ind, cmp_12.auto_submit_eclaim, cmp_12.auto_approve_eclaim
  • Index Cond: (cmp_12.company_id = cagg_12.agg_company_id)
362. 0.002 0.008 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=20) (actual time=0.008..0.008 rows=3 loops=1)

  • Output: ct_12.internal_company_type, ct_12.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
363. 0.006 0.006 ↑ 1.0 3 1

Seq Scan on client_basic_american.company_type ct_12 (cost=0.00..1.03 rows=3 width=20) (actual time=0.006..0.006 rows=3 loops=1)

  • Output: ct_12.internal_company_type, ct_12.company_type_id
  • Buffers: shared hit=1
364. 0.001 0.039 ↓ 0.0 0 1

Subquery Scan on contractee_view_13 (cost=887.40..890.27 rows=164 width=32) (actual time=0.039..0.039 rows=0 loops=1)

  • Output: contractee_view_13.contract_id, contractee_view_13.company_id
  • Buffers: shared hit=3
365. 0.000 0.038 ↓ 0.0 0 1

Unique (cost=887.40..888.63 rows=164 width=36) (actual time=0.038..0.038 rows=0 loops=1)

  • Output: cav_13.contract_amend_version_id, cmp_13.company_id, ct_13.internal_company_type
  • Buffers: shared hit=3
366. 0.004 0.038 ↓ 0.0 0 1

Sort (cost=887.40..887.81 rows=164 width=36) (actual time=0.038..0.038 rows=0 loops=1)

  • Output: cav_13.contract_amend_version_id, cmp_13.company_id, ct_13.internal_company_type
  • Sort Key: cmp_13.company_id, ct_13.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
367. 0.005 0.034 ↓ 0.0 0 1

Hash Join (cost=360.03..881.37 rows=164 width=36) (actual time=0.034..0.034 rows=0 loops=1)

  • Output: cav_13.contract_amend_version_id, cmp_13.company_id, ct_13.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_13.company_type_id = ct_13.company_type_id)
  • Buffers: shared hit=3
368. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=358.98..878.98 rows=164 width=48) (actual time=0.018..0.018 rows=0 loops=1)

  • Output: cav_13.contract_amend_version_id, cmp_13.company_id, cmp_13.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
369. 0.001 0.018 ↓ 0.0 0 1

Nested Loop (cost=358.70..818.72 rows=176 width=32) (actual time=0.018..0.018 rows=0 loops=1)

  • Output: cav_13.contract_amend_version_id, cagg_13.agg_company_id
  • Buffers: shared hit=2
370. 0.000 0.017 ↓ 0.0 0 1

Nested Loop Left Join (cost=358.29..663.13 rows=175 width=48) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: c_13.contractee_company_id, cav_13.contract_amend_version_id, cg_55.company_id
  • Buffers: shared hit=2
371. 0.005 0.017 ↓ 0.0 0 1

Hash Right Join (cost=357.87..373.54 rows=1 width=48) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: c_13.contractee_company_id, cav_13.contract_amend_version_id, groupings_list_13.grouping_id
  • Hash Cond: (groupings_list_13.original_grouping_id = c_13.contractee_grouping_id)
  • Buffers: shared hit=2
372. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_13 (cost=350.94..360.22 rows=464 width=52) (never executed)

  • Output: groupings_list_13.original_grouping_id, NULL::uuid, groupings_list_13.grouping_id, NULL::integer
373.          

CTE groupings_list

374. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..350.94 rows=464 width=52) (never executed)

375. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_kronos.grouping_company pg_13 (cost=0.00..19.34 rows=34 width=52) (never executed)

  • Output: pg_13.grouping_id, pg_13.parent_grouping_id, pg_13.grouping_id, 0
376. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=11.05..32.23 rows=43 width=52) (never executed)

  • Output: gl_13.original_grouping_id, cg_13.parent_grouping_id, cg_13.grouping_id, (gl_13.level + 1)
  • Hash Cond: (cg_13.parent_grouping_id = gl_13.grouping_id)
377. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_kronos.grouping_company cg_13 (cost=0.00..19.34 rows=29 width=32) (never executed)

  • Output: cg_13.grouping_id, cg_13.client_id, cg_13.grouping_description, cg_13.grouping_cd, cg_13.grouping_type, cg_13.parent_grouping_id, cg_13.active_ind, cg_13.company_type_id, cg_13.grouping_company_type
  • Filter: cg_13.active_ind
378. 0.000 0.000 ↓ 0.0 0

Hash (cost=6.80..6.80 rows=340 width=36) (never executed)

  • Output: gl_13.original_grouping_id, gl_13.level, gl_13.grouping_id
379. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_13 (cost=0.00..6.80 rows=340 width=36) (never executed)

  • Output: gl_13.original_grouping_id, gl_13.level, gl_13.grouping_id
380. 0.001 0.012 ↓ 0.0 0 1

Hash (cost=6.91..6.91 rows=1 width=48) (actual time=0.012..0.012 rows=0 loops=1)

  • Output: c_13.contractee_grouping_id, c_13.contractee_company_id, cav_13.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
381. 0.000 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.84..6.91 rows=1 width=48) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: c_13.contractee_grouping_id, c_13.contractee_company_id, cav_13.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
382. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.56..6.60 rows=1 width=32) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: crv_13.contract_family_id, cav_13.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
383. 0.010 0.010 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_kronos.contract_amend_version cav_13 (cost=0.28..3.30 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: cav_13.contract_amend_version_id, cav_13.contract_renew_version_id, cav_13.contract_state, cav_13.contract_amend_version_parent_id, cav_13.contract_name, cav_13.contact_name, cav_13.contact_email, cav_13.contact_phone, cav_13.create_timestamp, cav_13.amend_version
  • Index Cond: (cav_13.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
384. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_version_pkey on client_kronos.contract_renew_version crv_13 (cost=0.28..3.30 rows=1 width=32) (never executed)

  • Output: crv_13.contract_renew_version_id, crv_13.contract_family_id, crv_13.date_range, crv_13.create_timestamp, crv_13.dead, crv_13.renew_version
  • Index Cond: (crv_13.contract_renew_version_id = cav_13.contract_renew_version_id)
385. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_kronos.contract_family c_13 (cost=0.28..0.31 rows=1 width=48) (never executed)

  • Output: c_13.contract_family_id, c_13.client_id, c_13.contractee_company_id, c_13.contractee_grouping_id, c_13.creator_id, c_13.contract_sequence, c_13.cost_basis_type, c_13.contract_type, c_13.contract_title, c_13.contract_template_id, c_13.payment_calendar_id, c_13.catch_all, c_13.accrual_quantity_source, c_13.import_contract_number, c_13.accrual_lumpsum_spread
  • Index Cond: (c_13.contract_family_id = crv_13.contract_family_id)
386. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_kronos.company_grouping cg_55 (cost=0.41..277.08 rows=1,251 width=32) (never executed)

  • Output: cg_55.company_id, cg_55.grouping_id
  • Index Cond: (cg_55.grouping_id = groupings_list_13.grouping_id)
  • Heap Fetches: 0
387. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_kronos.company_agg cagg_13 (cost=0.41..0.88 rows=1 width=32) (never executed)

  • Output: cagg_13.company_id, cagg_13.agg_company_id
  • Index Cond: (cagg_13.company_id = COALESCE(c_13.contractee_company_id, cg_55.company_id))
  • Heap Fetches: 0
388. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_kronos.company cmp_13 (cost=0.29..0.34 rows=1 width=32) (never executed)

  • Output: cmp_13.company_id, cmp_13.client_id, cmp_13.company_name, cmp_13.company_number, cmp_13.company_type_id, cmp_13.active_ind, cmp_13.address_1, cmp_13.address_2, cmp_13.address_3, cmp_13.address_4, cmp_13.city, cmp_13.region, cmp_13.postal_code, cmp_13.country, cmp_13.company_agg_id, cmp_13.deduction_interval, cmp_13.alt_address_active, cmp_13.alt_address_1, cmp_13.alt_address_2, cmp_13.alt_address_3, cmp_13.alt_address_4, cmp_13.alt_city, cmp_13.alt_region, cmp_13.alt_postal_code, cmp_13.alt_country, cmp_13.atlas_company_id, cmp_13.email, cmp_13.tax_type_id, cmp_13.redistributor_ind, cmp_13.operator_request, cmp_13.early_payment_discount, cmp_13.vip, cmp_13.deduction_contact_email, cmp_13.is_unipro, cmp_13.is_golbon, cmp_13.is_ima, cmp_13.cross_ship_company_id, cmp_13.tpo_ind, cmp_13.auto_submit_eclaim, cmp_13.auto_approve_eclaim
  • Index Cond: (cmp_13.company_id = cagg_13.agg_company_id)
389. 0.003 0.011 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=20) (actual time=0.011..0.011 rows=2 loops=1)

  • Output: ct_13.internal_company_type, ct_13.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
390. 0.008 0.008 ↑ 1.0 2 1

Seq Scan on client_kronos.company_type ct_13 (cost=0.00..1.02 rows=2 width=20) (actual time=0.008..0.008 rows=2 loops=1)

  • Output: ct_13.internal_company_type, ct_13.company_type_id
  • Buffers: shared hit=1
391. 0.001 0.038 ↓ 0.0 0 1

Subquery Scan on contractee_view_14 (cost=1,239.45..1,240.03 rows=33 width=32) (actual time=0.038..0.038 rows=0 loops=1)

  • Output: contractee_view_14.contract_id, contractee_view_14.company_id
  • Buffers: shared hit=3
392. 0.001 0.037 ↓ 0.0 0 1

Unique (cost=1,239.45..1,239.70 rows=33 width=36) (actual time=0.037..0.037 rows=0 loops=1)

  • Output: cav_14.contract_amend_version_id, cmp_14.company_id, ct_14.internal_company_type
  • Buffers: shared hit=3
393. 0.004 0.036 ↓ 0.0 0 1

Sort (cost=1,239.45..1,239.54 rows=33 width=36) (actual time=0.036..0.036 rows=0 loops=1)

  • Output: cav_14.contract_amend_version_id, cmp_14.company_id, ct_14.internal_company_type
  • Sort Key: cmp_14.company_id, ct_14.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
394. 0.005 0.032 ↓ 0.0 0 1

Hash Join (cost=1,071.64..1,238.62 rows=33 width=36) (actual time=0.032..0.032 rows=0 loops=1)

  • Output: cav_14.contract_amend_version_id, cmp_14.company_id, ct_14.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_14.company_type_id = ct_14.company_type_id)
  • Buffers: shared hit=3
395. 0.000 0.019 ↓ 0.0 0 1

Nested Loop (cost=1,070.55..1,237.36 rows=33 width=48) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: cav_14.contract_amend_version_id, cmp_14.company_id, cmp_14.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
396. 0.001 0.019 ↓ 0.0 0 1

Nested Loop (cost=1,070.27..1,226.43 rows=33 width=32) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: cav_14.contract_amend_version_id, cagg_14.agg_company_id
  • Buffers: shared hit=2
397. 0.000 0.018 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,069.99..1,209.03 rows=23 width=48) (actual time=0.018..0.018 rows=0 loops=1)

  • Output: c_14.contractee_company_id, cav_14.contract_amend_version_id, cg_56.company_id
  • Buffers: shared hit=2
398. 0.005 0.018 ↓ 0.0 0 1

Hash Right Join (cost=1,069.71..1,172.52 rows=1 width=48) (actual time=0.018..0.018 rows=0 loops=1)

  • Output: c_14.contractee_company_id, cav_14.contract_amend_version_id, groupings_list_14.grouping_id
  • Hash Cond: (groupings_list_14.original_grouping_id = c_14.contractee_grouping_id)
  • Buffers: shared hit=2
399. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_14 (cost=1,062.78..1,123.70 rows=3,046 width=52) (never executed)

  • Output: groupings_list_14.original_grouping_id, NULL::uuid, groupings_list_14.grouping_id, NULL::integer
400.          

CTE groupings_list

401. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..1,062.78 rows=3,046 width=52) (never executed)

402. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_parway.grouping_company pg_14 (cost=0.00..43.26 rows=126 width=52) (never executed)

  • Output: pg_14.grouping_id, pg_14.parent_grouping_id, pg_14.grouping_id, 0
403. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=40.95..95.86 rows=292 width=52) (never executed)

  • Output: gl_14.original_grouping_id, cg_14.parent_grouping_id, cg_14.grouping_id, (gl_14.level + 1)
  • Hash Cond: (cg_14.parent_grouping_id = gl_14.grouping_id)
404. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_parway.grouping_company cg_14 (cost=0.00..43.26 rows=50 width=32) (never executed)

  • Output: cg_14.grouping_id, cg_14.client_id, cg_14.grouping_description, cg_14.grouping_cd, cg_14.grouping_type, cg_14.parent_grouping_id, cg_14.active_ind, cg_14.company_type_id, cg_14.grouping_company_type
  • Filter: cg_14.active_ind
405. 0.000 0.000 ↓ 0.0 0

Hash (cost=25.20..25.20 rows=1,260 width=36) (never executed)

  • Output: gl_14.original_grouping_id, gl_14.level, gl_14.grouping_id
406. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_14 (cost=0.00..25.20 rows=1,260 width=36) (never executed)

  • Output: gl_14.original_grouping_id, gl_14.level, gl_14.grouping_id
407. 0.001 0.013 ↓ 0.0 0 1

Hash (cost=6.91..6.91 rows=1 width=48) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: c_14.contractee_grouping_id, c_14.contractee_company_id, cav_14.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
408. 0.000 0.012 ↓ 0.0 0 1

Nested Loop (cost=0.84..6.91 rows=1 width=48) (actual time=0.012..0.012 rows=0 loops=1)

  • Output: c_14.contractee_grouping_id, c_14.contractee_company_id, cav_14.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
409. 0.001 0.012 ↓ 0.0 0 1

Nested Loop (cost=0.56..6.60 rows=1 width=32) (actual time=0.012..0.012 rows=0 loops=1)

  • Output: crv_14.contract_family_id, cav_14.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
410. 0.011 0.011 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_parway.contract_amend_version cav_14 (cost=0.28..3.30 rows=1 width=32) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: cav_14.contract_amend_version_id, cav_14.contract_renew_version_id, cav_14.contract_state, cav_14.contract_amend_version_parent_id, cav_14.contract_name, cav_14.contact_name, cav_14.contact_email, cav_14.contact_phone, cav_14.create_timestamp, cav_14.amend_version
  • Index Cond: (cav_14.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
411. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_parway.contract_renew_version crv_14 (cost=0.28..3.30 rows=1 width=32) (never executed)

  • Output: crv_14.contract_renew_version_id, crv_14.contract_family_id, crv_14.date_range, crv_14.create_timestamp, crv_14.dead, crv_14.renew_version
  • Index Cond: (crv_14.contract_renew_version_id = cav_14.contract_renew_version_id)
412. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_parway.contract_family c_14 (cost=0.28..0.31 rows=1 width=48) (never executed)

  • Output: c_14.contract_family_id, c_14.client_id, c_14.contractee_company_id, c_14.contractee_grouping_id, c_14.creator_id, c_14.contract_sequence, c_14.cost_basis_type, c_14.contract_type, c_14.contract_title, c_14.contract_template_id, c_14.payment_calendar_id, c_14.catch_all, c_14.accrual_quantity_source, c_14.import_contract_number, c_14.accrual_lumpsum_spread
  • Index Cond: (c_14.contract_family_id = crv_14.contract_family_id)
413. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_parway.company_grouping cg_56 (cost=0.28..35.52 rows=99 width=32) (never executed)

  • Output: cg_56.company_id, cg_56.grouping_id
  • Index Cond: (cg_56.grouping_id = groupings_list_14.grouping_id)
  • Heap Fetches: 0
414. 0.000 0.000 ↓ 0.0 0

Index Scan using company_agg_idx on client_parway.company_agg cagg_14 (cost=0.28..0.75 rows=1 width=32) (never executed)

  • Output: cagg_14.company_id, cagg_14.agg_company_id, cagg_14.parent_agg_company_id
  • Index Cond: (cagg_14.company_id = COALESCE(c_14.contractee_company_id, cg_56.company_id))
415. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_parway.company cmp_14 (cost=0.28..0.33 rows=1 width=32) (never executed)

  • Output: cmp_14.company_id, cmp_14.client_id, cmp_14.company_name, cmp_14.company_number, cmp_14.company_type_id, cmp_14.active_ind, cmp_14.address_1, cmp_14.address_2, cmp_14.address_3, cmp_14.address_4, cmp_14.city, cmp_14.region, cmp_14.postal_code, cmp_14.country, cmp_14.company_agg_id, cmp_14.deduction_interval, cmp_14.alt_address_active, cmp_14.alt_address_1, cmp_14.alt_address_2, cmp_14.alt_address_3, cmp_14.alt_address_4, cmp_14.alt_city, cmp_14.alt_region, cmp_14.alt_postal_code, cmp_14.alt_country, cmp_14.atlas_company_id, cmp_14.email, cmp_14.tax_type_id, cmp_14.redistributor_ind, cmp_14.operator_request, cmp_14.early_payment_discount, cmp_14.vip, cmp_14.deduction_contact_email, cmp_14.is_unipro, cmp_14.is_golbon, cmp_14.is_ima, cmp_14.cross_ship_company_id, cmp_14.tpo_ind, cmp_14.auto_submit_eclaim, cmp_14.auto_approve_eclaim
  • Index Cond: (cmp_14.company_id = cagg_14.agg_company_id)
416. 0.001 0.008 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=20) (actual time=0.008..0.008 rows=4 loops=1)

  • Output: ct_14.internal_company_type, ct_14.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
417. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on client_parway.company_type ct_14 (cost=0.00..1.04 rows=4 width=20) (actual time=0.006..0.007 rows=4 loops=1)

  • Output: ct_14.internal_company_type, ct_14.company_type_id
  • Buffers: shared hit=1
418. 0.001 0.091 ↓ 0.0 0 1

Subquery Scan on contractee_view_15 (cost=1,669.41..1,675.99 rows=376 width=32) (actual time=0.091..0.091 rows=0 loops=1)

  • Output: contractee_view_15.contract_id, contractee_view_15.company_id
  • Buffers: shared hit=3
419. 0.000 0.090 ↓ 0.0 0 1

Unique (cost=1,669.41..1,672.23 rows=376 width=36) (actual time=0.090..0.090 rows=0 loops=1)

  • Output: cav_15.contract_amend_version_id, cmp_15.company_id, ct_15.internal_company_type
  • Buffers: shared hit=3
420. 0.005 0.090 ↓ 0.0 0 1

Sort (cost=1,669.41..1,670.35 rows=376 width=36) (actual time=0.090..0.090 rows=0 loops=1)

  • Output: cav_15.contract_amend_version_id, cmp_15.company_id, ct_15.internal_company_type
  • Sort Key: cmp_15.company_id, ct_15.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
421. 0.004 0.085 ↓ 0.0 0 1

Hash Join (cost=1,314.51..1,653.33 rows=376 width=36) (actual time=0.085..0.085 rows=0 loops=1)

  • Output: cav_15.contract_amend_version_id, cmp_15.company_id, ct_15.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_15.company_type_id = ct_15.company_type_id)
  • Buffers: shared hit=3
422. 0.001 0.017 ↓ 0.0 0 1

Nested Loop (cost=1,313.35..1,650.59 rows=376 width=48) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: cav_15.contract_amend_version_id, cmp_15.company_id, cmp_15.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
423. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=1,313.07..1,512.39 rows=454 width=32) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: cav_15.contract_amend_version_id, cagg_15.agg_company_id
  • Buffers: shared hit=2
424. 0.000 0.015 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,312.66..1,430.04 rows=51 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: c_15.contractee_company_id, cav_15.contract_amend_version_id, cg_57.company_id
  • Buffers: shared hit=2
425. 0.005 0.015 ↓ 0.0 0 1

Hash Right Join (cost=1,312.37..1,350.79 rows=1 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: c_15.contractee_company_id, cav_15.contract_amend_version_id, groupings_list_15.grouping_id
  • Hash Cond: (groupings_list_15.original_grouping_id = c_15.contractee_grouping_id)
  • Buffers: shared hit=2
426. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_15 (cost=1,305.44..1,328.20 rows=1,138 width=52) (never executed)

  • Output: groupings_list_15.original_grouping_id, NULL::uuid, groupings_list_15.grouping_id, NULL::integer
427.          

CTE groupings_list

428. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..1,305.44 rows=1,138 width=52) (never executed)

429. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_lactalis.grouping_company pg_15 (cost=0.00..53.38 rows=138 width=52) (never executed)

  • Output: pg_15.grouping_id, pg_15.parent_grouping_id, pg_15.grouping_id, 0
430. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=44.85..122.93 rows=100 width=52) (never executed)

  • Output: gl_15.original_grouping_id, cg_15.parent_grouping_id, cg_15.grouping_id, (gl_15.level + 1)
  • Hash Cond: (cg_15.parent_grouping_id = gl_15.grouping_id)
431. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_lactalis.grouping_company cg_15 (cost=0.00..53.38 rows=134 width=32) (never executed)

  • Output: cg_15.grouping_id, cg_15.client_id, cg_15.grouping_description, cg_15.grouping_cd, cg_15.grouping_type, cg_15.parent_grouping_id, cg_15.active_ind, cg_15.company_type_id, cg_15.grouping_company_type
  • Filter: cg_15.active_ind
432. 0.000 0.000 ↓ 0.0 0

Hash (cost=27.60..27.60 rows=1,380 width=36) (never executed)

  • Output: gl_15.original_grouping_id, gl_15.level, gl_15.grouping_id
433. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_15 (cost=0.00..27.60 rows=1,380 width=36) (never executed)

  • Output: gl_15.original_grouping_id, gl_15.level, gl_15.grouping_id
434. 0.000 0.010 ↓ 0.0 0 1

Hash (cost=6.92..6.92 rows=1 width=48) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: c_15.contractee_grouping_id, c_15.contractee_company_id, cav_15.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
435. 0.000 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.85..6.92 rows=1 width=48) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: c_15.contractee_grouping_id, c_15.contractee_company_id, cav_15.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
436. 0.001 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.57..6.60 rows=1 width=32) (actual time=0.009..0.010 rows=0 loops=1)

  • Output: crv_15.contract_family_id, cav_15.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
437. 0.009 0.009 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_lactalis.contract_amend_version cav_15 (cost=0.29..3.30 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_15.contract_amend_version_id, cav_15.contract_renew_version_id, cav_15.contract_state, cav_15.contract_amend_version_parent_id, cav_15.contract_name, cav_15.contact_name, cav_15.contact_email, cav_15.contact_phone, cav_15.create_timestamp, cav_15.amend_version
  • Index Cond: (cav_15.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
438. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_lactalis.contract_renew_version crv_15 (cost=0.28..3.30 rows=1 width=32) (never executed)

  • Output: crv_15.contract_renew_version_id, crv_15.contract_family_id, crv_15.date_range, crv_15.create_timestamp, crv_15.dead, crv_15.renew_version
  • Index Cond: (crv_15.contract_renew_version_id = cav_15.contract_renew_version_id)
439. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_lactalis.contract_family c_15 (cost=0.28..0.32 rows=1 width=48) (never executed)

  • Output: c_15.contract_family_id, c_15.client_id, c_15.contractee_company_id, c_15.contractee_grouping_id, c_15.creator_id, c_15.contract_sequence, c_15.cost_basis_type, c_15.contract_type, c_15.contract_title, c_15.contract_template_id, c_15.payment_calendar_id, c_15.catch_all, c_15.accrual_quantity_source, c_15.import_contract_number, c_15.accrual_lumpsum_spread
  • Index Cond: (c_15.contract_family_id = crv_15.contract_family_id)
440. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_lactalis.company_grouping cg_57 (cost=0.29..78.41 rows=84 width=32) (never executed)

  • Output: cg_57.company_id, cg_57.grouping_id
  • Index Cond: (cg_57.grouping_id = groupings_list_15.grouping_id)
  • Heap Fetches: 0
441. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_lactalis.company_agg cagg_15 (cost=0.41..1.52 rows=9 width=32) (never executed)

  • Output: cagg_15.company_id, cagg_15.agg_company_id
  • Index Cond: (cagg_15.company_id = COALESCE(c_15.contractee_company_id, cg_57.company_id))
  • Heap Fetches: 0
442. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_lactalis.company cmp_15 (cost=0.28..0.30 rows=1 width=32) (never executed)

  • Output: cmp_15.company_id, cmp_15.client_id, cmp_15.company_name, cmp_15.company_number, cmp_15.company_type_id, cmp_15.active_ind, cmp_15.address_1, cmp_15.address_2, cmp_15.address_3, cmp_15.address_4, cmp_15.city, cmp_15.region, cmp_15.postal_code, cmp_15.country, cmp_15.company_agg_id, cmp_15.deduction_interval, cmp_15.alt_address_active, cmp_15.alt_address_1, cmp_15.alt_address_2, cmp_15.alt_address_3, cmp_15.alt_address_4, cmp_15.alt_city, cmp_15.alt_region, cmp_15.alt_postal_code, cmp_15.alt_country, cmp_15.atlas_company_id, cmp_15.email, cmp_15.tax_type_id, cmp_15.redistributor_ind, cmp_15.operator_request, cmp_15.early_payment_discount, cmp_15.vip, cmp_15.deduction_contact_email, cmp_15.is_unipro, cmp_15.is_golbon, cmp_15.is_ima, cmp_15.cross_ship_company_id, cmp_15.tpo_ind, cmp_15.auto_submit_eclaim, cmp_15.auto_approve_eclaim
  • Index Cond: (cmp_15.company_id = cagg_15.agg_company_id)
443. 0.056 0.064 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=20) (actual time=0.063..0.064 rows=7 loops=1)

  • Output: ct_15.internal_company_type, ct_15.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
444. 0.008 0.008 ↑ 1.0 7 1

Seq Scan on client_lactalis.company_type ct_15 (cost=0.00..1.07 rows=7 width=20) (actual time=0.006..0.008 rows=7 loops=1)

  • Output: ct_15.internal_company_type, ct_15.company_type_id
  • Buffers: shared hit=1
445. 0.001 0.026 ↓ 0.0 0 1

Subquery Scan on contractee_view_16 (cost=98.38..98.49 rows=6 width=32) (actual time=0.026..0.026 rows=0 loops=1)

  • Output: contractee_view_16.contract_id, contractee_view_16.company_id
  • Buffers: shared hit=2
446. 0.001 0.025 ↓ 0.0 0 1

Unique (cost=98.38..98.43 rows=6 width=36) (actual time=0.025..0.025 rows=0 loops=1)

  • Output: cav_16.contract_amend_version_id, cmp_16.company_id, ct_16.internal_company_type
  • Buffers: shared hit=2
447. 0.008 0.024 ↓ 0.0 0 1

Sort (cost=98.38..98.40 rows=6 width=36) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: cav_16.contract_amend_version_id, cmp_16.company_id, ct_16.internal_company_type
  • Sort Key: cmp_16.company_id, ct_16.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2
448. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=81.16..98.31 rows=6 width=36) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: cav_16.contract_amend_version_id, cmp_16.company_id, ct_16.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=2
449. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=81.03..97.41 rows=6 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: cav_16.contract_amend_version_id, cmp_16.company_id, cmp_16.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
450. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=80.76..95.41 rows=6 width=32) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_16.contract_amend_version_id, cagg_16.agg_company_id
  • Buffers: shared hit=2
451. 0.001 0.014 ↓ 0.0 0 1

Nested Loop Left Join (cost=80.48..93.37 rows=6 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: c_16.contractee_company_id, cav_16.contract_amend_version_id, cg_58.company_id
  • Buffers: shared hit=2
452. 0.004 0.013 ↓ 0.0 0 1

Hash Right Join (cost=80.21..85.18 rows=1 width=48) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: c_16.contractee_company_id, cav_16.contract_amend_version_id, groupings_list_16.grouping_id
  • Hash Cond: (groupings_list_16.original_grouping_id = c_16.contractee_grouping_id)
  • Buffers: shared hit=2
453. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_16 (cost=73.28..76.22 rows=147 width=52) (never executed)

  • Output: groupings_list_16.original_grouping_id, NULL::uuid, groupings_list_16.grouping_id, NULL::integer
454.          

CTE groupings_list

455. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..73.28 rows=147 width=52) (never executed)

456. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_lantmannen.grouping_company pg_16 (cost=0.00..1.17 rows=17 width=52) (never executed)

  • Output: pg_16.grouping_id, pg_16.parent_grouping_id, pg_16.grouping_id, 0
457. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=5.53..6.92 rows=13 width=52) (never executed)

  • Output: gl_16.original_grouping_id, cg_16.parent_grouping_id, cg_16.grouping_id, (gl_16.level + 1)
  • Hash Cond: (cg_16.parent_grouping_id = gl_16.grouping_id)
458. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_lantmannen.grouping_company cg_16 (cost=0.00..1.17 rows=16 width=32) (never executed)

  • Output: cg_16.grouping_id, cg_16.client_id, cg_16.grouping_description, cg_16.grouping_cd, cg_16.grouping_type, cg_16.parent_grouping_id, cg_16.active_ind, cg_16.company_type_id, cg_16.grouping_company_type
  • Filter: cg_16.active_ind
459. 0.000 0.000 ↓ 0.0 0

Hash (cost=3.40..3.40 rows=170 width=36) (never executed)

  • Output: gl_16.original_grouping_id, gl_16.level, gl_16.grouping_id
460. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_16 (cost=0.00..3.40 rows=170 width=36) (never executed)

  • Output: gl_16.original_grouping_id, gl_16.level, gl_16.grouping_id
461. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=6.91..6.91 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_16.contractee_grouping_id, c_16.contractee_company_id, cav_16.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
462. 0.001 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.83..6.91 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_16.contractee_grouping_id, c_16.contractee_company_id, cav_16.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
463. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.56..6.60 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: crv_16.contract_family_id, cav_16.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
464. 0.008 0.008 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_lantmannen.contract_amend_version cav_16 (cost=0.28..3.29 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: cav_16.contract_amend_version_id, cav_16.contract_renew_version_id, cav_16.contract_state, cav_16.contract_amend_version_parent_id, cav_16.contract_name, cav_16.contact_name, cav_16.contact_email, cav_16.contact_phone, cav_16.create_timestamp, cav_16.amend_version
  • Index Cond: (cav_16.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
465. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_lantmannen.contract_renew_version crv_16 (cost=0.28..3.29 rows=1 width=32) (never executed)

  • Output: crv_16.contract_renew_version_id, crv_16.contract_family_id, crv_16.date_range, crv_16.create_timestamp, crv_16.dead, crv_16.renew_version
  • Index Cond: (crv_16.contract_renew_version_id = cav_16.contract_renew_version_id)
466. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_lantmannen.contract_family c_16 (cost=0.27..0.31 rows=1 width=48) (never executed)

  • Output: c_16.contract_family_id, c_16.client_id, c_16.contractee_company_id, c_16.contractee_grouping_id, c_16.creator_id, c_16.contract_sequence, c_16.cost_basis_type, c_16.contract_type, c_16.contract_title, c_16.contract_template_id, c_16.payment_calendar_id, c_16.catch_all, c_16.accrual_quantity_source, c_16.import_contract_number, c_16.accrual_lumpsum_spread
  • Index Cond: (c_16.contract_family_id = crv_16.contract_family_id)
467. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_lantmannen.company_grouping cg_58 (cost=0.28..7.61 rows=58 width=32) (never executed)

  • Output: cg_58.company_id, cg_58.grouping_id
  • Index Cond: (cg_58.grouping_id = groupings_list_16.grouping_id)
  • Heap Fetches: 0
468. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_lantmannen.company_agg cagg_16 (cost=0.28..0.33 rows=1 width=32) (never executed)

  • Output: cagg_16.company_id, cagg_16.agg_company_id
  • Index Cond: (cagg_16.company_id = COALESCE(c_16.contractee_company_id, cg_58.company_id))
  • Heap Fetches: 0
469. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_lantmannen.company cmp_16 (cost=0.28..0.33 rows=1 width=32) (never executed)

  • Output: cmp_16.company_id, cmp_16.client_id, cmp_16.company_name, cmp_16.company_number, cmp_16.company_type_id, cmp_16.active_ind, cmp_16.address_1, cmp_16.address_2, cmp_16.address_3, cmp_16.address_4, cmp_16.city, cmp_16.region, cmp_16.postal_code, cmp_16.country, cmp_16.company_agg_id, cmp_16.deduction_interval, cmp_16.alt_address_active, cmp_16.alt_address_1, cmp_16.alt_address_2, cmp_16.alt_address_3, cmp_16.alt_address_4, cmp_16.alt_city, cmp_16.alt_region, cmp_16.alt_postal_code, cmp_16.alt_country, cmp_16.atlas_company_id, cmp_16.email, cmp_16.tax_type_id, cmp_16.redistributor_ind, cmp_16.operator_request, cmp_16.early_payment_discount, cmp_16.vip, cmp_16.deduction_contact_email, cmp_16.is_unipro, cmp_16.is_golbon, cmp_16.is_ima, cmp_16.cross_ship_company_id, cmp_16.tpo_ind, cmp_16.auto_submit_eclaim, cmp_16.auto_approve_eclaim
  • Index Cond: (cmp_16.company_id = cagg_16.agg_company_id)
470. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_lantmannen.company_type ct_16 (cost=0.13..0.15 rows=1 width=20) (never executed)

  • Output: ct_16.company_type_id, ct_16.client_id, ct_16.company_type_description, ct_16.company_type_cd, ct_16.active_ind, ct_16.internal_company_type
  • Index Cond: (ct_16.company_type_id = cmp_16.company_type_id)
471. 0.000 0.061 ↓ 0.0 0 1

Subquery Scan on contractee_view_17 (cost=1,831.84..1,832.66 rows=47 width=32) (actual time=0.061..0.061 rows=0 loops=1)

  • Output: contractee_view_17.contract_id, contractee_view_17.company_id
  • Buffers: shared hit=3
472. 0.001 0.061 ↓ 0.0 0 1

Unique (cost=1,831.84..1,832.19 rows=47 width=36) (actual time=0.060..0.061 rows=0 loops=1)

  • Output: cav_17.contract_amend_version_id, cmp_17.company_id, ct_17.internal_company_type
  • Buffers: shared hit=3
473. 0.004 0.060 ↓ 0.0 0 1

Sort (cost=1,831.84..1,831.96 rows=47 width=36) (actual time=0.059..0.060 rows=0 loops=1)

  • Output: cav_17.contract_amend_version_id, cmp_17.company_id, ct_17.internal_company_type
  • Sort Key: cmp_17.company_id, ct_17.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
474. 0.004 0.056 ↓ 0.0 0 1

Hash Join (cost=1,589.46..1,830.54 rows=47 width=36) (actual time=0.056..0.056 rows=0 loops=1)

  • Output: cav_17.contract_amend_version_id, cmp_17.company_id, ct_17.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_17.company_type_id = ct_17.company_type_id)
  • Buffers: shared hit=3
475. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=1,588.30..1,829.18 rows=47 width=48) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: cav_17.contract_amend_version_id, cmp_17.company_id, cmp_17.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
476. 0.001 0.017 ↓ 0.0 0 1

Nested Loop (cost=1,588.02..1,813.08 rows=47 width=32) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: cav_17.contract_amend_version_id, cagg_17.agg_company_id
  • Buffers: shared hit=2
477. 0.001 0.016 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,587.74..1,796.73 rows=46 width=48) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: c_17.contractee_company_id, cav_17.contract_amend_version_id, cg_59.company_id
  • Buffers: shared hit=2
478. 0.004 0.015 ↓ 0.0 0 1

Hash Right Join (cost=1,587.33..1,723.86 rows=1 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: c_17.contractee_company_id, cav_17.contract_amend_version_id, groupings_list_17.grouping_id
  • Hash Cond: (groupings_list_17.original_grouping_id = c_17.contractee_grouping_id)
  • Buffers: shared hit=2
479. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_17 (cost=1,580.39..1,661.29 rows=4,045 width=52) (never executed)

  • Output: groupings_list_17.original_grouping_id, NULL::uuid, groupings_list_17.grouping_id, NULL::integer
480.          

CTE groupings_list

481. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..1,580.39 rows=4,045 width=52) (never executed)

482. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_king_prince.grouping_company pg_17 (cost=0.00..88.05 rows=105 width=52) (never executed)

  • Output: pg_17.grouping_id, pg_17.parent_grouping_id, pg_17.grouping_id, 0
483. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=34.12..141.14 rows=394 width=52) (never executed)

  • Output: gl_17.original_grouping_id, cg_17.parent_grouping_id, cg_17.grouping_id, (gl_17.level + 1)
  • Hash Cond: (cg_17.parent_grouping_id = gl_17.grouping_id)
484. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_king_prince.grouping_company cg_17 (cost=0.00..88.05 rows=105 width=32) (never executed)

  • Output: cg_17.grouping_id, cg_17.client_id, cg_17.grouping_description, cg_17.grouping_cd, cg_17.grouping_type, cg_17.parent_grouping_id, cg_17.active_ind, cg_17.company_type_id, cg_17.grouping_company_type
  • Filter: cg_17.active_ind
485. 0.000 0.000 ↓ 0.0 0

Hash (cost=21.00..21.00 rows=1,050 width=36) (never executed)

  • Output: gl_17.original_grouping_id, gl_17.level, gl_17.grouping_id
486. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_17 (cost=0.00..21.00 rows=1,050 width=36) (never executed)

  • Output: gl_17.original_grouping_id, gl_17.level, gl_17.grouping_id
487. 0.001 0.011 ↓ 0.0 0 1

Hash (cost=6.93..6.93 rows=1 width=48) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: c_17.contractee_grouping_id, c_17.contractee_company_id, cav_17.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
488. 0.000 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.84..6.93 rows=1 width=48) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: c_17.contractee_grouping_id, c_17.contractee_company_id, cav_17.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
489. 0.001 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.56..6.60 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: crv_17.contract_family_id, cav_17.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
490. 0.009 0.009 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_king_prince.contract_amend_version cav_17 (cost=0.28..3.30 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_17.contract_amend_version_id, cav_17.contract_renew_version_id, cav_17.contract_state, cav_17.contract_amend_version_parent_id, cav_17.contract_name, cav_17.contact_name, cav_17.contact_email, cav_17.contact_phone, cav_17.create_timestamp, cav_17.amend_version
  • Index Cond: (cav_17.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
491. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_king_prince.contract_renew_version crv_17 (cost=0.28..3.29 rows=1 width=32) (never executed)

  • Output: crv_17.contract_renew_version_id, crv_17.contract_family_id, crv_17.date_range, crv_17.create_timestamp, crv_17.dead, crv_17.renew_version
  • Index Cond: (crv_17.contract_renew_version_id = cav_17.contract_renew_version_id)
492. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_king_prince.contract_family c_17 (cost=0.28..0.33 rows=1 width=48) (never executed)

  • Output: c_17.contract_family_id, c_17.client_id, c_17.contractee_company_id, c_17.contractee_grouping_id, c_17.creator_id, c_17.contract_sequence, c_17.cost_basis_type, c_17.contract_type, c_17.contract_title, c_17.contract_template_id, c_17.payment_calendar_id, c_17.catch_all, c_17.accrual_quantity_source, c_17.import_contract_number, c_17.accrual_lumpsum_spread
  • Index Cond: (c_17.contract_family_id = crv_17.contract_family_id)
493. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_king_prince.company_grouping cg_59 (cost=0.41..70.85 rows=202 width=32) (never executed)

  • Output: cg_59.company_id, cg_59.grouping_id
  • Index Cond: (cg_59.grouping_id = groupings_list_17.grouping_id)
  • Heap Fetches: 0
494. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_king_prince.company_agg cagg_17 (cost=0.28..0.35 rows=1 width=32) (never executed)

  • Output: cagg_17.company_id, cagg_17.agg_company_id
  • Index Cond: (cagg_17.company_id = COALESCE(c_17.contractee_company_id, cg_59.company_id))
  • Heap Fetches: 0
495. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_king_prince.company cmp_17 (cost=0.28..0.34 rows=1 width=32) (never executed)

  • Output: cmp_17.company_id, cmp_17.client_id, cmp_17.company_name, cmp_17.company_number, cmp_17.company_type_id, cmp_17.active_ind, cmp_17.address_1, cmp_17.address_2, cmp_17.address_3, cmp_17.address_4, cmp_17.city, cmp_17.region, cmp_17.postal_code, cmp_17.country, cmp_17.company_agg_id, cmp_17.deduction_interval, cmp_17.alt_address_active, cmp_17.alt_address_1, cmp_17.alt_address_2, cmp_17.alt_address_3, cmp_17.alt_address_4, cmp_17.alt_city, cmp_17.alt_region, cmp_17.alt_postal_code, cmp_17.alt_country, cmp_17.atlas_company_id, cmp_17.email, cmp_17.tax_type_id, cmp_17.redistributor_ind, cmp_17.operator_request, cmp_17.early_payment_discount, cmp_17.vip, cmp_17.deduction_contact_email, cmp_17.is_unipro, cmp_17.is_golbon, cmp_17.is_ima, cmp_17.cross_ship_company_id, cmp_17.tpo_ind, cmp_17.auto_submit_eclaim, cmp_17.auto_approve_eclaim
  • Index Cond: (cmp_17.company_id = cagg_17.agg_company_id)
496. 0.003 0.035 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=20) (actual time=0.035..0.035 rows=7 loops=1)

  • Output: ct_17.internal_company_type, ct_17.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
497. 0.032 0.032 ↑ 1.0 7 1

Seq Scan on client_king_prince.company_type ct_17 (cost=0.00..1.07 rows=7 width=20) (actual time=0.031..0.032 rows=7 loops=1)

  • Output: ct_17.internal_company_type, ct_17.company_type_id
  • Buffers: shared hit=1
498. 0.001 0.037 ↓ 0.0 0 1

Subquery Scan on contractee_view_18 (cost=6,786.78..6,786.81 rows=2 width=32) (actual time=0.037..0.037 rows=0 loops=1)

  • Output: contractee_view_18.contract_id, contractee_view_18.company_id
  • Buffers: shared hit=2
499. 0.001 0.036 ↓ 0.0 0 1

Unique (cost=6,786.78..6,786.79 rows=2 width=36) (actual time=0.036..0.036 rows=0 loops=1)

  • Output: cav_18.contract_amend_version_id, cmp_18.company_id, ct_18.internal_company_type
  • Buffers: shared hit=2
500. 0.003 0.035 ↓ 0.0 0 1

Sort (cost=6,786.78..6,786.78 rows=2 width=36) (actual time=0.035..0.035 rows=0 loops=1)

  • Output: cav_18.contract_amend_version_id, cmp_18.company_id, ct_18.internal_company_type
  • Sort Key: cmp_18.company_id, ct_18.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2
501. 0.001 0.032 ↓ 0.0 0 1

Nested Loop (cost=4,730.98..6,786.77 rows=2 width=36) (actual time=0.032..0.032 rows=0 loops=1)

  • Output: cav_18.contract_amend_version_id, cmp_18.company_id, ct_18.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=2
502. 0.000 0.031 ↓ 0.0 0 1

Nested Loop (cost=4,730.85..6,786.28 rows=2 width=48) (actual time=0.031..0.031 rows=0 loops=1)

  • Output: cav_18.contract_amend_version_id, cmp_18.company_id, cmp_18.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
503. 0.001 0.031 ↓ 0.0 0 1

Nested Loop (cost=4,730.71..6,785.43 rows=4 width=32) (actual time=0.031..0.031 rows=0 loops=1)

  • Output: cav_18.contract_amend_version_id, cagg_18.agg_company_id
  • Buffers: shared hit=2
504. 0.000 0.030 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,730.57..6,783.13 rows=7 width=48) (actual time=0.030..0.030 rows=0 loops=1)

  • Output: c_18.contractee_company_id, cav_18.contract_amend_version_id, cg_60.company_id
  • Buffers: shared hit=2
505. 0.005 0.030 ↓ 0.0 0 1

Hash Right Join (cost=4,730.42..6,772.64 rows=1 width=48) (actual time=0.029..0.030 rows=0 loops=1)

  • Output: c_18.contractee_company_id, cav_18.contract_amend_version_id, groupings_list_18.grouping_id
  • Hash Cond: (groupings_list_18.original_grouping_id = c_18.contractee_grouping_id)
  • Buffers: shared hit=2
506. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_18 (cost=4,727.47..5,937.67 rows=60,510 width=52) (never executed)

  • Output: groupings_list_18.original_grouping_id, NULL::uuid, groupings_list_18.grouping_id, NULL::integer
507.          

CTE groupings_list

508. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..4,727.47 rows=60,510 width=52) (never executed)

509. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_tpro_demo.grouping_company pg_18 (cost=0.00..14.90 rows=490 width=52) (never executed)

  • Output: pg_18.grouping_id, pg_18.parent_grouping_id, pg_18.grouping_id, 0
510. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=17.96..350.24 rows=6,002 width=52) (never executed)

  • Output: gl_18.original_grouping_id, cg_18.parent_grouping_id, cg_18.grouping_id, (gl_18.level + 1)
  • Hash Cond: (gl_18.grouping_id = cg_18.parent_grouping_id)
511. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_18 (cost=0.00..98.00 rows=4,900 width=36) (never executed)

  • Output: gl_18.original_grouping_id, gl_18.parent_grouping_id, gl_18.grouping_id, gl_18.level
512. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.90..14.90 rows=245 width=32) (never executed)

  • Output: cg_18.parent_grouping_id, cg_18.grouping_id
513. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_tpro_demo.grouping_company cg_18 (cost=0.00..14.90 rows=245 width=32) (never executed)

  • Output: cg_18.parent_grouping_id, cg_18.grouping_id
  • Filter: cg_18.active_ind
514. 0.000 0.025 ↓ 0.0 0 1

Hash (cost=2.93..2.93 rows=1 width=48) (actual time=0.025..0.025 rows=0 loops=1)

  • Output: c_18.contractee_grouping_id, c_18.contractee_company_id, cav_18.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
515. 0.001 0.025 ↓ 0.0 0 1

Nested Loop (cost=1.40..2.93 rows=1 width=48) (actual time=0.025..0.025 rows=0 loops=1)

  • Output: c_18.contractee_grouping_id, c_18.contractee_company_id, cav_18.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
516. 0.005 0.024 ↓ 0.0 0 1

Hash Join (cost=1.26..2.51 rows=1 width=32) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: crv_18.contract_family_id, cav_18.contract_amend_version_id
  • Inner Unique: true
  • Hash Cond: (crv_18.contract_renew_version_id = cav_18.contract_renew_version_id)
  • Buffers: shared hit=2
517. 0.010 0.010 ↑ 19.0 1 1

Seq Scan on client_tpro_demo.contract_renew_version crv_18 (cost=0.00..1.19 rows=19 width=32) (actual time=0.010..0.010 rows=1 loops=1)

  • Output: crv_18.contract_renew_version_id, crv_18.contract_family_id, crv_18.date_range, crv_18.create_timestamp, crv_18.dead, crv_18.renew_version
  • Buffers: shared hit=1
518. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=1.25..1.25 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_18.contract_amend_version_id, cav_18.contract_renew_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
519. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on client_tpro_demo.contract_amend_version cav_18 (cost=0.00..1.25 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_18.contract_amend_version_id, cav_18.contract_renew_version_id
  • Filter: (cav_18.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 20
  • Buffers: shared hit=1
520. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_tpro_demo.contract_family c_18 (cost=0.14..0.39 rows=1 width=48) (never executed)

  • Output: c_18.contract_family_id, c_18.client_id, c_18.contractee_company_id, c_18.contractee_grouping_id, c_18.creator_id, c_18.contract_sequence, c_18.cost_basis_type, c_18.contract_type, c_18.contract_title, c_18.contract_template_id, c_18.payment_calendar_id, c_18.catch_all, c_18.accrual_quantity_source, c_18.import_contract_number, c_18.accrual_lumpsum_spread
  • Index Cond: (c_18.contract_family_id = crv_18.contract_family_id)
521. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_tpro_demo.company_grouping cg_60 (cost=0.15..10.42 rows=7 width=32) (never executed)

  • Output: cg_60.company_id, cg_60.grouping_id
  • Index Cond: (cg_60.grouping_id = groupings_list_18.grouping_id)
  • Heap Fetches: 0
522. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_tpro_demo.company_agg cagg_18 (cost=0.14..0.32 rows=1 width=32) (never executed)

  • Output: cagg_18.company_id, cagg_18.agg_company_id
  • Index Cond: (cagg_18.company_id = COALESCE(c_18.contractee_company_id, cg_60.company_id))
  • Heap Fetches: 0
523. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_tpro_demo.company cmp_18 (cost=0.14..0.21 rows=1 width=32) (never executed)

  • Output: cmp_18.company_id, cmp_18.client_id, cmp_18.company_name, cmp_18.company_number, cmp_18.company_type_id, cmp_18.active_ind, cmp_18.address_1, cmp_18.address_2, cmp_18.address_3, cmp_18.address_4, cmp_18.city, cmp_18.region, cmp_18.postal_code, cmp_18.country, cmp_18.company_agg_id, cmp_18.deduction_interval, cmp_18.alt_address_active, cmp_18.alt_address_1, cmp_18.alt_address_2, cmp_18.alt_address_3, cmp_18.alt_address_4, cmp_18.alt_city, cmp_18.alt_region, cmp_18.alt_postal_code, cmp_18.alt_country, cmp_18.atlas_company_id, cmp_18.email, cmp_18.tax_type_id, cmp_18.redistributor_ind, cmp_18.operator_request, cmp_18.early_payment_discount, cmp_18.vip, cmp_18.deduction_contact_email, cmp_18.is_unipro, cmp_18.is_golbon, cmp_18.is_ima, cmp_18.cross_ship_company_id, cmp_18.tpo_ind, cmp_18.auto_submit_eclaim, cmp_18.auto_approve_eclaim
  • Index Cond: (cmp_18.company_id = cagg_18.agg_company_id)
524. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_tpro_demo.company_type ct_18 (cost=0.13..0.22 rows=1 width=20) (never executed)

  • Output: ct_18.company_type_id, ct_18.client_id, ct_18.company_type_description, ct_18.company_type_cd, ct_18.active_ind, ct_18.internal_company_type
  • Index Cond: (ct_18.company_type_id = cmp_18.company_type_id)
525. 0.001 0.052 ↓ 0.0 0 1

Subquery Scan on contractee_view_19 (cost=32.66..32.68 rows=1 width=32) (actual time=0.052..0.052 rows=0 loops=1)

  • Output: contractee_view_19.contract_id, contractee_view_19.company_id
  • Buffers: shared hit=3
526. 0.000 0.051 ↓ 0.0 0 1

Unique (cost=32.66..32.67 rows=1 width=36) (actual time=0.051..0.051 rows=0 loops=1)

  • Output: cav_19.contract_amend_version_id, cmp_19.company_id, ct_19.internal_company_type
  • Buffers: shared hit=3
527. 0.004 0.051 ↓ 0.0 0 1

Sort (cost=32.66..32.67 rows=1 width=36) (actual time=0.051..0.051 rows=0 loops=1)

  • Output: cav_19.contract_amend_version_id, cmp_19.company_id, ct_19.internal_company_type
  • Sort Key: cmp_19.company_id, ct_19.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
528. 0.000 0.047 ↓ 0.0 0 1

Nested Loop (cost=16.67..32.65 rows=1 width=36) (actual time=0.047..0.047 rows=0 loops=1)

  • Output: cav_19.contract_amend_version_id, cmp_19.company_id, ct_19.internal_company_type
  • Inner Unique: true
  • Join Filter: (cmp_19.company_type_id = ct_19.company_type_id)
  • Buffers: shared hit=3
529. 0.001 0.047 ↓ 0.0 0 1

Nested Loop (cost=16.67..31.58 rows=1 width=48) (actual time=0.047..0.047 rows=0 loops=1)

  • Output: cav_19.contract_amend_version_id, cmp_19.company_id, cmp_19.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=3
530. 0.004 0.046 ↓ 0.0 0 1

Hash Join (cost=16.54..30.63 rows=1 width=32) (actual time=0.046..0.046 rows=0 loops=1)

  • Output: cav_19.contract_amend_version_id, cagg_19.agg_company_id
  • Hash Cond: (COALESCE(c_19.contractee_company_id, cg_61.company_id) = cagg_19.company_id)
  • Buffers: shared hit=3
531. 0.001 0.023 ↓ 0.0 0 1

Nested Loop Left Join (cost=15.38..29.43 rows=7 width=48) (actual time=0.023..0.023 rows=0 loops=1)

  • Output: c_19.contractee_company_id, cav_19.contract_amend_version_id, cg_61.company_id
  • Buffers: shared hit=2
532. 0.000 0.022 ↓ 0.0 0 1

Nested Loop Left Join (cost=15.23..17.44 rows=1 width=48) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: c_19.contractee_company_id, cav_19.contract_amend_version_id, groupings_list_19.grouping_id
  • Join Filter: (groupings_list_19.original_grouping_id = c_19.contractee_grouping_id)
  • Buffers: shared hit=2
533. 0.001 0.022 ↓ 0.0 0 1

Nested Loop (cost=1.27..3.02 rows=1 width=48) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: c_19.contractee_grouping_id, c_19.contractee_company_id, cav_19.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
534. 0.004 0.021 ↓ 0.0 0 1

Hash Join (cost=1.14..2.26 rows=1 width=32) (actual time=0.021..0.021 rows=0 loops=1)

  • Output: crv_19.contract_family_id, cav_19.contract_amend_version_id
  • Inner Unique: true
  • Hash Cond: (crv_19.contract_renew_version_id = cav_19.contract_renew_version_id)
  • Buffers: shared hit=2
535. 0.010 0.010 ↑ 9.0 1 1

Seq Scan on client_jel_sert.contract_renew_version crv_19 (cost=0.00..1.09 rows=9 width=32) (actual time=0.010..0.010 rows=1 loops=1)

  • Output: crv_19.contract_renew_version_id, crv_19.contract_family_id, crv_19.date_range, crv_19.create_timestamp, crv_19.dead, crv_19.renew_version
  • Buffers: shared hit=1
536. 0.001 0.007 ↓ 0.0 0 1

Hash (cost=1.12..1.12 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=1)

  • Output: cav_19.contract_amend_version_id, cav_19.contract_renew_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
537. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on client_jel_sert.contract_amend_version cav_19 (cost=0.00..1.12 rows=1 width=32) (actual time=0.006..0.006 rows=0 loops=1)

  • Output: cav_19.contract_amend_version_id, cav_19.contract_renew_version_id
  • Filter: (cav_19.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 10
  • Buffers: shared hit=1
538. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_jel_sert.contract_family c_19 (cost=0.14..0.65 rows=1 width=48) (never executed)

  • Output: c_19.contract_family_id, c_19.client_id, c_19.contractee_company_id, c_19.contractee_grouping_id, c_19.creator_id, c_19.contract_sequence, c_19.cost_basis_type, c_19.contract_type, c_19.contract_title, c_19.contract_template_id, c_19.payment_calendar_id, c_19.catch_all, c_19.accrual_quantity_source, c_19.import_contract_number, c_19.accrual_lumpsum_spread
  • Index Cond: (c_19.contract_family_id = crv_19.contract_family_id)
539. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_19 (cost=13.95..14.17 rows=11 width=52) (never executed)

  • Output: groupings_list_19.original_grouping_id, NULL::uuid, groupings_list_19.grouping_id, NULL::integer
540.          

CTE groupings_list

541. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..13.95 rows=11 width=52) (never executed)

542. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_jel_sert.grouping_company pg_19 (cost=0.00..1.01 rows=1 width=52) (never executed)

  • Output: pg_19.grouping_id, pg_19.parent_grouping_id, pg_19.grouping_id, 0
543. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.02..1.27 rows=1 width=52) (never executed)

  • Output: gl_19.original_grouping_id, cg_19.parent_grouping_id, cg_19.grouping_id, (gl_19.level + 1)
  • Hash Cond: (gl_19.grouping_id = cg_19.parent_grouping_id)
544. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_19 (cost=0.00..0.20 rows=10 width=36) (never executed)

  • Output: gl_19.original_grouping_id, gl_19.parent_grouping_id, gl_19.grouping_id, gl_19.level
545. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.01..1.01 rows=1 width=32) (never executed)

  • Output: cg_19.parent_grouping_id, cg_19.grouping_id
546. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_jel_sert.grouping_company cg_19 (cost=0.00..1.01 rows=1 width=32) (never executed)

  • Output: cg_19.parent_grouping_id, cg_19.grouping_id
  • Filter: cg_19.active_ind
547. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_jel_sert.company_grouping cg_61 (cost=0.15..11.92 rows=7 width=32) (never executed)

  • Output: cg_61.company_id, cg_61.grouping_id
  • Index Cond: (cg_61.grouping_id = groupings_list_19.grouping_id)
  • Heap Fetches: 0
548. 0.007 0.019 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=32) (actual time=0.019..0.019 rows=7 loops=1)

  • Output: cagg_19.company_id, cagg_19.agg_company_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
549. 0.012 0.012 ↑ 1.0 7 1

Seq Scan on client_jel_sert.company_agg cagg_19 (cost=0.00..1.07 rows=7 width=32) (actual time=0.011..0.012 rows=7 loops=1)

  • Output: cagg_19.company_id, cagg_19.agg_company_id
  • Buffers: shared hit=1
550. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_jel_sert.company cmp_19 (cost=0.13..0.79 rows=1 width=32) (never executed)

  • Output: cmp_19.company_id, cmp_19.client_id, cmp_19.company_name, cmp_19.company_number, cmp_19.company_type_id, cmp_19.active_ind, cmp_19.address_1, cmp_19.address_2, cmp_19.address_3, cmp_19.address_4, cmp_19.city, cmp_19.region, cmp_19.postal_code, cmp_19.country, cmp_19.company_agg_id, cmp_19.deduction_interval, cmp_19.alt_address_active, cmp_19.alt_address_1, cmp_19.alt_address_2, cmp_19.alt_address_3, cmp_19.alt_address_4, cmp_19.alt_city, cmp_19.alt_region, cmp_19.alt_postal_code, cmp_19.alt_country, cmp_19.atlas_company_id, cmp_19.email, cmp_19.tax_type_id, cmp_19.redistributor_ind, cmp_19.operator_request, cmp_19.early_payment_discount, cmp_19.vip, cmp_19.deduction_contact_email, cmp_19.is_unipro, cmp_19.is_golbon, cmp_19.is_ima, cmp_19.cross_ship_company_id, cmp_19.tpo_ind, cmp_19.auto_submit_eclaim, cmp_19.auto_approve_eclaim
  • Index Cond: (cmp_19.company_id = cagg_19.agg_company_id)
551. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_jel_sert.company_type ct_19 (cost=0.00..1.03 rows=3 width=20) (never executed)

  • Output: ct_19.company_type_id, ct_19.client_id, ct_19.company_type_description, ct_19.company_type_cd, ct_19.active_ind, ct_19.internal_company_type
552. 0.001 0.088 ↓ 0.0 0 1

Subquery Scan on contractee_view_20 (cost=48.26..48.31 rows=3 width=32) (actual time=0.087..0.088 rows=0 loops=1)

  • Output: contractee_view_20.contract_id, contractee_view_20.company_id
  • Buffers: shared hit=5
553. 0.000 0.087 ↓ 0.0 0 1

Unique (cost=48.26..48.28 rows=3 width=36) (actual time=0.087..0.087 rows=0 loops=1)

  • Output: cav_20.contract_amend_version_id, cmp_20.company_id, ct_20.internal_company_type
  • Buffers: shared hit=5
554. 0.003 0.087 ↓ 0.0 0 1

Sort (cost=48.26..48.27 rows=3 width=36) (actual time=0.087..0.087 rows=0 loops=1)

  • Output: cav_20.contract_amend_version_id, cmp_20.company_id, ct_20.internal_company_type
  • Sort Key: cmp_20.company_id, ct_20.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=5
555. 0.001 0.084 ↓ 0.0 0 1

Nested Loop (cost=35.63..48.24 rows=3 width=36) (actual time=0.084..0.084 rows=0 loops=1)

  • Output: cav_20.contract_amend_version_id, cmp_20.company_id, ct_20.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=5
556. 0.000 0.083 ↓ 0.0 0 1

Nested Loop (cost=35.50..47.79 rows=3 width=48) (actual time=0.083..0.083 rows=0 loops=1)

  • Output: cav_20.contract_amend_version_id, cmp_20.company_id, cmp_20.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=5
557. 0.001 0.083 ↓ 0.0 0 1

Nested Loop (cost=35.23..46.76 rows=3 width=32) (actual time=0.083..0.083 rows=0 loops=1)

  • Output: cav_20.contract_amend_version_id, cagg_20.agg_company_id
  • Buffers: shared hit=5
558. 0.000 0.082 ↓ 0.0 0 1

Nested Loop Left Join (cost=34.95..41.35 rows=3 width=48) (actual time=0.082..0.082 rows=0 loops=1)

  • Output: c_20.contractee_company_id, cav_20.contract_amend_version_id, cg_62.company_id
  • Buffers: shared hit=5
559. 0.002 0.082 ↓ 0.0 0 1

Nested Loop (cost=34.68..38.66 rows=1 width=48) (actual time=0.082..0.082 rows=0 loops=1)

  • Output: c_20.contractee_company_id, cav_20.contract_amend_version_id, groupings_list_20.grouping_id
  • Inner Unique: true
  • Join Filter: (crv_20.contract_renew_version_id = cav_20.contract_renew_version_id)
  • Buffers: shared hit=5
560. 0.002 0.071 ↑ 1.0 1 1

Nested Loop (cost=34.68..37.64 rows=1 width=48) (actual time=0.069..0.071 rows=1 loops=1)

  • Output: c_20.contractee_company_id, crv_20.contract_renew_version_id, groupings_list_20.grouping_id
  • Join Filter: (c_20.contract_family_id = crv_20.contract_family_id)
  • Buffers: shared hit=4
561. 0.008 0.060 ↑ 1.0 1 1

Hash Right Join (cost=34.68..36.62 rows=1 width=48) (actual time=0.058..0.060 rows=1 loops=1)

  • Output: c_20.contract_family_id, c_20.contractee_company_id, groupings_list_20.grouping_id
  • Hash Cond: (groupings_list_20.original_grouping_id = c_20.contractee_grouping_id)
  • Buffers: shared hit=3
562. 0.041 0.041 ↑ 4.8 12 1

CTE Scan on groupings_list groupings_list_20 (cost=33.66..34.80 rows=57 width=52) (actual time=0.011..0.041 rows=12 loops=1)

  • Output: groupings_list_20.original_grouping_id, NULL::uuid, groupings_list_20.grouping_id, NULL::integer
  • Buffers: shared hit=2
563.          

CTE groupings_list

564. 0.007 0.033 ↑ 4.8 12 1

Recursive Union (cost=0.00..33.66 rows=57 width=52) (actual time=0.008..0.033 rows=12 loops=1)

  • Buffers: shared hit=2
565. 0.008 0.008 ↑ 1.0 7 1

Seq Scan on client_pepsico.grouping_company pg_20 (cost=0.00..1.07 rows=7 width=52) (actual time=0.006..0.008 rows=7 loops=1)

  • Output: pg_20.grouping_id, pg_20.parent_grouping_id, pg_20.grouping_id, 0
  • Buffers: shared hit=1
566. 0.008 0.018 ↑ 2.5 2 2

Hash Join (cost=1.16..3.15 rows=5 width=52) (actual time=0.008..0.009 rows=2 loops=2)

  • Output: gl_20.original_grouping_id, cg_20.parent_grouping_id, cg_20.grouping_id, (gl_20.level + 1)
  • Hash Cond: (gl_20.grouping_id = cg_20.parent_grouping_id)
  • Buffers: shared hit=1
567. 0.004 0.004 ↑ 11.7 6 2

WorkTable Scan on groupings_list gl_20 (cost=0.00..1.40 rows=70 width=36) (actual time=0.001..0.002 rows=6 loops=2)

  • Output: gl_20.original_grouping_id, gl_20.parent_grouping_id, gl_20.grouping_id, gl_20.level
568. 0.002 0.006 ↑ 1.4 5 1

Hash (cost=1.07..1.07 rows=7 width=32) (actual time=0.006..0.006 rows=5 loops=1)

  • Output: cg_20.parent_grouping_id, cg_20.grouping_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
569. 0.004 0.004 ↑ 1.0 7 1

Seq Scan on client_pepsico.grouping_company cg_20 (cost=0.00..1.07 rows=7 width=32) (actual time=0.002..0.004 rows=7 loops=1)

  • Output: cg_20.parent_grouping_id, cg_20.grouping_id
  • Filter: cg_20.active_ind
  • Buffers: shared hit=1
570. 0.002 0.011 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=48) (actual time=0.011..0.011 rows=1 loops=1)

  • Output: c_20.contract_family_id, c_20.contractee_grouping_id, c_20.contractee_company_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
571. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on client_pepsico.contract_family c_20 (cost=0.00..1.01 rows=1 width=48) (actual time=0.009..0.009 rows=1 loops=1)

  • Output: c_20.contract_family_id, c_20.contractee_grouping_id, c_20.contractee_company_id
  • Buffers: shared hit=1
572. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on client_pepsico.contract_renew_version crv_20 (cost=0.00..1.01 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=1)

  • Output: crv_20.contract_renew_version_id, crv_20.contract_family_id, crv_20.date_range, crv_20.create_timestamp, crv_20.dead, crv_20.renew_version
  • Buffers: shared hit=1
573. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on client_pepsico.contract_amend_version cav_20 (cost=0.00..1.01 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_20.contract_amend_version_id, cav_20.contract_renew_version_id, cav_20.contract_state, cav_20.contract_amend_version_parent_id, cav_20.contract_name, cav_20.contact_name, cav_20.contact_email, cav_20.contact_phone, cav_20.create_timestamp, cav_20.amend_version
  • Filter: (cav_20.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
574. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_pepsico.company_grouping cg_62 (cost=0.27..2.23 rows=46 width=32) (never executed)

  • Output: cg_62.company_id, cg_62.grouping_id
  • Index Cond: (cg_62.grouping_id = groupings_list_20.grouping_id)
  • Heap Fetches: 0
575. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_pepsico.company_agg cagg_20 (cost=0.28..1.79 rows=1 width=32) (never executed)

  • Output: cagg_20.company_id, cagg_20.agg_company_id
  • Index Cond: (cagg_20.company_id = COALESCE(c_20.contractee_company_id, cg_62.company_id))
  • Heap Fetches: 0
576. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_pepsico.company cmp_20 (cost=0.28..0.34 rows=1 width=32) (never executed)

  • Output: cmp_20.company_id, cmp_20.client_id, cmp_20.company_name, cmp_20.company_number, cmp_20.company_type_id, cmp_20.active_ind, cmp_20.address_1, cmp_20.address_2, cmp_20.address_3, cmp_20.address_4, cmp_20.city, cmp_20.region, cmp_20.postal_code, cmp_20.country, cmp_20.company_agg_id, cmp_20.deduction_interval, cmp_20.alt_address_active, cmp_20.alt_address_1, cmp_20.alt_address_2, cmp_20.alt_address_3, cmp_20.alt_address_4, cmp_20.alt_city, cmp_20.alt_region, cmp_20.alt_postal_code, cmp_20.alt_country, cmp_20.atlas_company_id, cmp_20.email, cmp_20.tax_type_id, cmp_20.redistributor_ind, cmp_20.operator_request, cmp_20.early_payment_discount, cmp_20.vip, cmp_20.deduction_contact_email, cmp_20.is_unipro, cmp_20.is_golbon, cmp_20.is_ima, cmp_20.cross_ship_company_id, cmp_20.tpo_ind, cmp_20.auto_submit_eclaim, cmp_20.auto_approve_eclaim
  • Index Cond: (cmp_20.company_id = cagg_20.agg_company_id)
577. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_pepsico.company_type ct_20 (cost=0.13..0.15 rows=1 width=20) (never executed)

  • Output: ct_20.company_type_id, ct_20.client_id, ct_20.company_type_description, ct_20.company_type_cd, ct_20.active_ind, ct_20.internal_company_type
  • Index Cond: (ct_20.company_type_id = cmp_20.company_type_id)
578. 0.000 0.030 ↓ 0.0 0 1

Subquery Scan on contractee_view_21 (cost=2,262.78..2,263.40 rows=35 width=32) (actual time=0.030..0.030 rows=0 loops=1)

  • Output: contractee_view_21.contract_id, contractee_view_21.company_id
  • Buffers: shared hit=3
579. 0.001 0.030 ↓ 0.0 0 1

Unique (cost=2,262.78..2,263.05 rows=35 width=36) (actual time=0.030..0.030 rows=0 loops=1)

  • Output: cav_21.contract_amend_version_id, cmp_21.company_id, ct_21.internal_company_type
  • Buffers: shared hit=3
580. 0.004 0.029 ↓ 0.0 0 1

Sort (cost=2,262.78..2,262.87 rows=35 width=36) (actual time=0.029..0.029 rows=0 loops=1)

  • Output: cav_21.contract_amend_version_id, cmp_21.company_id, ct_21.internal_company_type
  • Sort Key: cmp_21.company_id, ct_21.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
581. 0.002 0.025 ↓ 0.0 0 1

Hash Join (cost=2,112.70..2,261.89 rows=35 width=36) (actual time=0.025..0.025 rows=0 loops=1)

  • Output: cav_21.contract_amend_version_id, cmp_21.company_id, ct_21.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_21.company_type_id = ct_21.company_type_id)
  • Buffers: shared hit=3
582. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=2,111.63..2,260.59 rows=35 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_21.contract_amend_version_id, cmp_21.company_id, cmp_21.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
583. 0.000 0.013 ↓ 0.0 0 1

Nested Loop (cost=2,111.35..2,248.82 rows=35 width=32) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: cav_21.contract_amend_version_id, cagg_21.agg_company_id
  • Buffers: shared hit=2
584. 0.001 0.013 ↓ 0.0 0 1

Nested Loop Left Join (cost=2,111.07..2,230.23 rows=28 width=48) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: c_21.contractee_company_id, cav_21.contract_amend_version_id, cg_63.company_id
  • Buffers: shared hit=2
585. 0.003 0.012 ↓ 0.0 0 1

Hash Right Join (cost=2,110.79..2,186.48 rows=2 width=48) (actual time=0.012..0.012 rows=0 loops=1)

  • Output: c_21.contractee_company_id, cav_21.contract_amend_version_id, groupings_list_21.grouping_id
  • Hash Cond: (groupings_list_21.original_grouping_id = c_21.contractee_grouping_id)
  • Buffers: shared hit=2
586. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_21 (cost=2,103.86..2,148.70 rows=2,242 width=52) (never executed)

  • Output: groupings_list_21.original_grouping_id, NULL::uuid, groupings_list_21.grouping_id, NULL::integer
587.          

CTE groupings_list

588. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..2,103.86 rows=2,242 width=52) (never executed)

589. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_calavo.grouping_company pg_21 (cost=0.00..153.82 rows=82 width=52) (never executed)

  • Output: pg_21.grouping_id, pg_21.parent_grouping_id, pg_21.grouping_id, 0
590. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26.65..190.52 rows=216 width=52) (never executed)

  • Output: gl_21.original_grouping_id, cg_21.parent_grouping_id, cg_21.grouping_id, (gl_21.level + 1)
  • Hash Cond: (cg_21.parent_grouping_id = gl_21.grouping_id)
591. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_calavo.grouping_company cg_21 (cost=0.00..153.82 rows=70 width=32) (never executed)

  • Output: cg_21.grouping_id, cg_21.client_id, cg_21.grouping_description, cg_21.grouping_cd, cg_21.grouping_type, cg_21.parent_grouping_id, cg_21.active_ind, cg_21.company_type_id, cg_21.grouping_company_type
  • Filter: cg_21.active_ind
592. 0.000 0.000 ↓ 0.0 0

Hash (cost=16.40..16.40 rows=820 width=36) (never executed)

  • Output: gl_21.original_grouping_id, gl_21.level, gl_21.grouping_id
593. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_21 (cost=0.00..16.40 rows=820 width=36) (never executed)

  • Output: gl_21.original_grouping_id, gl_21.level, gl_21.grouping_id
594. 0.001 0.009 ↓ 0.0 0 1

Hash (cost=6.92..6.92 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_21.contractee_grouping_id, c_21.contractee_company_id, cav_21.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
595. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.82..6.92 rows=1 width=48) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: c_21.contractee_grouping_id, c_21.contractee_company_id, cav_21.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
596. 0.001 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.55..6.59 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: crv_21.contract_family_id, cav_21.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
597. 0.007 0.007 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_calavo.contract_amend_version cav_21 (cost=0.28..3.29 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=1)

  • Output: cav_21.contract_amend_version_id, cav_21.contract_renew_version_id, cav_21.contract_state, cav_21.contract_amend_version_parent_id, cav_21.contract_name, cav_21.contact_name, cav_21.contact_email, cav_21.contact_phone, cav_21.create_timestamp, cav_21.amend_version
  • Index Cond: (cav_21.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
598. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_calavo.contract_renew_version crv_21 (cost=0.28..3.29 rows=1 width=32) (never executed)

  • Output: crv_21.contract_renew_version_id, crv_21.contract_family_id, crv_21.date_range, crv_21.create_timestamp, crv_21.dead, crv_21.renew_version
  • Index Cond: (crv_21.contract_renew_version_id = cav_21.contract_renew_version_id)
599. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_calavo.contract_family c_21 (cost=0.27..0.32 rows=1 width=48) (never executed)

  • Output: c_21.contract_family_id, c_21.client_id, c_21.contractee_company_id, c_21.contractee_grouping_id, c_21.creator_id, c_21.contract_sequence, c_21.cost_basis_type, c_21.contract_type, c_21.contract_title, c_21.contract_template_id, c_21.payment_calendar_id, c_21.catch_all, c_21.accrual_quantity_source, c_21.import_contract_number, c_21.accrual_lumpsum_spread
  • Index Cond: (c_21.contract_family_id = crv_21.contract_family_id)
600. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_calavo.company_grouping cg_63 (cost=0.28..21.44 rows=44 width=32) (never executed)

  • Output: cg_63.company_id, cg_63.grouping_id
  • Index Cond: (cg_63.grouping_id = groupings_list_21.grouping_id)
  • Heap Fetches: 0
601. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_calavo.company_agg cagg_21 (cost=0.28..0.65 rows=1 width=32) (never executed)

  • Output: cagg_21.company_id, cagg_21.agg_company_id
  • Index Cond: (cagg_21.company_id = COALESCE(c_21.contractee_company_id, cg_63.company_id))
  • Heap Fetches: 0
602. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_calavo.company cmp_21 (cost=0.28..0.34 rows=1 width=32) (never executed)

  • Output: cmp_21.company_id, cmp_21.client_id, cmp_21.company_name, cmp_21.company_number, cmp_21.company_type_id, cmp_21.active_ind, cmp_21.address_1, cmp_21.address_2, cmp_21.address_3, cmp_21.address_4, cmp_21.city, cmp_21.region, cmp_21.postal_code, cmp_21.country, cmp_21.company_agg_id, cmp_21.deduction_interval, cmp_21.alt_address_active, cmp_21.alt_address_1, cmp_21.alt_address_2, cmp_21.alt_address_3, cmp_21.alt_address_4, cmp_21.alt_city, cmp_21.alt_region, cmp_21.alt_postal_code, cmp_21.alt_country, cmp_21.atlas_company_id, cmp_21.email, cmp_21.tax_type_id, cmp_21.redistributor_ind, cmp_21.operator_request, cmp_21.early_payment_discount, cmp_21.vip, cmp_21.deduction_contact_email, cmp_21.is_unipro, cmp_21.is_golbon, cmp_21.is_ima, cmp_21.cross_ship_company_id, cmp_21.tpo_ind, cmp_21.auto_submit_eclaim, cmp_21.auto_approve_eclaim
  • Index Cond: (cmp_21.company_id = cagg_21.agg_company_id)
603. 0.002 0.009 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=20) (actual time=0.009..0.009 rows=3 loops=1)

  • Output: ct_21.internal_company_type, ct_21.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
604. 0.007 0.007 ↑ 1.0 3 1

Seq Scan on client_calavo.company_type ct_21 (cost=0.00..1.03 rows=3 width=20) (actual time=0.006..0.007 rows=3 loops=1)

  • Output: ct_21.internal_company_type, ct_21.company_type_id
  • Buffers: shared hit=1
605. 0.000 0.028 ↓ 0.0 0 1

Subquery Scan on contractee_view_22 (cost=3,073.41..3,073.65 rows=14 width=32) (actual time=0.028..0.028 rows=0 loops=1)

  • Output: contractee_view_22.contract_id, contractee_view_22.company_id
  • Buffers: shared hit=3
606. 0.001 0.028 ↓ 0.0 0 1

Unique (cost=3,073.41..3,073.51 rows=14 width=36) (actual time=0.027..0.028 rows=0 loops=1)

  • Output: cav_22.contract_amend_version_id, cmp_22.company_id, ct_22.internal_company_type
  • Buffers: shared hit=3
607. 0.003 0.027 ↓ 0.0 0 1

Sort (cost=3,073.41..3,073.44 rows=14 width=36) (actual time=0.027..0.027 rows=0 loops=1)

  • Output: cav_22.contract_amend_version_id, cmp_22.company_id, ct_22.internal_company_type
  • Sort Key: cmp_22.company_id, ct_22.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
608. 0.003 0.024 ↓ 0.0 0 1

Hash Join (cost=2,882.86..3,073.14 rows=14 width=36) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: cav_22.contract_amend_version_id, cmp_22.company_id, ct_22.internal_company_type
  • Inner Unique: true
  • Hash Cond: (cmp_22.company_type_id = ct_22.company_type_id)
  • Buffers: shared hit=3
609. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=2,881.82..3,071.98 rows=14 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_22.contract_amend_version_id, cmp_22.company_id, cmp_22.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
610. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=2,881.53..3,063.23 rows=27 width=32) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_22.contract_amend_version_id, cagg_22.agg_company_id
  • Buffers: shared hit=2
611. 0.000 0.013 ↓ 0.0 0 1

Nested Loop Left Join (cost=2,881.12..3,042.60 rows=27 width=48) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: c_22.contractee_company_id, cav_22.contract_amend_version_id, cg_64.company_id
  • Buffers: shared hit=2
612. 0.004 0.013 ↓ 0.0 0 1

Hash Right Join (cost=2,880.84..2,999.17 rows=1 width=48) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: c_22.contractee_company_id, cav_22.contract_amend_version_id, groupings_list_22.grouping_id
  • Hash Cond: (groupings_list_22.original_grouping_id = c_22.contractee_grouping_id)
  • Buffers: shared hit=2
613. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_22 (cost=2,873.91..2,944.03 rows=3,506 width=52) (never executed)

  • Output: groupings_list_22.original_grouping_id, NULL::uuid, groupings_list_22.grouping_id, NULL::integer
614.          

CTE groupings_list

615. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..2,873.91 rows=3,506 width=52) (never executed)

616. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_elkay_plastics.grouping_company pg_22 (cost=0.00..211.96 rows=96 width=52) (never executed)

  • Output: pg_22.grouping_id, pg_22.parent_grouping_id, pg_22.grouping_id, 0
617. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=31.20..259.18 rows=341 width=52) (never executed)

  • Output: gl_22.original_grouping_id, cg_22.parent_grouping_id, cg_22.grouping_id, (gl_22.level + 1)
  • Hash Cond: (cg_22.parent_grouping_id = gl_22.grouping_id)
618. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_elkay_plastics.grouping_company cg_22 (cost=0.00..211.96 rows=96 width=32) (never executed)

  • Output: cg_22.grouping_id, cg_22.client_id, cg_22.grouping_description, cg_22.grouping_cd, cg_22.grouping_type, cg_22.parent_grouping_id, cg_22.active_ind, cg_22.company_type_id, cg_22.grouping_company_type
  • Filter: cg_22.active_ind
619. 0.000 0.000 ↓ 0.0 0

Hash (cost=19.20..19.20 rows=960 width=36) (never executed)

  • Output: gl_22.original_grouping_id, gl_22.level, gl_22.grouping_id
620. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_22 (cost=0.00..19.20 rows=960 width=36) (never executed)

  • Output: gl_22.original_grouping_id, gl_22.level, gl_22.grouping_id
621. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=6.92..6.92 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_22.contractee_grouping_id, c_22.contractee_company_id, cav_22.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
622. 0.001 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.84..6.92 rows=1 width=48) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: c_22.contractee_grouping_id, c_22.contractee_company_id, cav_22.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
623. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.56..6.60 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: crv_22.contract_family_id, cav_22.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=2
624. 0.008 0.008 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_elkay_plastics.contract_amend_version cav_22 (cost=0.28..3.30 rows=1 width=32) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: cav_22.contract_amend_version_id, cav_22.contract_renew_version_id, cav_22.contract_state, cav_22.contract_amend_version_parent_id, cav_22.contract_name, cav_22.contact_name, cav_22.contact_email, cav_22.contact_phone, cav_22.create_timestamp, cav_22.amend_version
  • Index Cond: (cav_22.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=2
625. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_elkay_plastics.contract_renew_version crv_22 (cost=0.28..3.30 rows=1 width=32) (never executed)

  • Output: crv_22.contract_renew_version_id, crv_22.contract_family_id, crv_22.date_range, crv_22.create_timestamp, crv_22.dead, crv_22.renew_version
  • Index Cond: (crv_22.contract_renew_version_id = cav_22.contract_renew_version_id)
626. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_elkay_plastics.contract_family c_22 (cost=0.28..0.32 rows=1 width=48) (never executed)

  • Output: c_22.contract_family_id, c_22.client_id, c_22.contractee_company_id, c_22.contractee_grouping_id, c_22.creator_id, c_22.contract_sequence, c_22.cost_basis_type, c_22.contract_type, c_22.contract_title, c_22.contract_template_id, c_22.payment_calendar_id, c_22.catch_all, c_22.accrual_quantity_source, c_22.import_contract_number, c_22.accrual_lumpsum_spread
  • Index Cond: (c_22.contract_family_id = crv_22.contract_family_id)
627. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_elkay_plastics.company_grouping cg_64 (cost=0.28..41.89 rows=153 width=32) (never executed)

  • Output: cg_64.company_id, cg_64.grouping_id
  • Index Cond: (cg_64.grouping_id = groupings_list_22.grouping_id)
  • Heap Fetches: 0
628. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_elkay_plastics.company_agg cagg_22 (cost=0.41..0.75 rows=1 width=32) (never executed)

  • Output: cagg_22.company_id, cagg_22.agg_company_id
  • Index Cond: (cagg_22.company_id = COALESCE(c_22.contractee_company_id, cg_64.company_id))
  • Heap Fetches: 0
629. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_elkay_plastics.company cmp_22 (cost=0.29..0.32 rows=1 width=32) (never executed)

  • Output: cmp_22.company_id, cmp_22.client_id, cmp_22.company_name, cmp_22.company_number, cmp_22.company_type_id, cmp_22.active_ind, cmp_22.address_1, cmp_22.address_2, cmp_22.address_3, cmp_22.address_4, cmp_22.city, cmp_22.region, cmp_22.postal_code, cmp_22.country, cmp_22.company_agg_id, cmp_22.deduction_interval, cmp_22.alt_address_active, cmp_22.alt_address_1, cmp_22.alt_address_2, cmp_22.alt_address_3, cmp_22.alt_address_4, cmp_22.alt_city, cmp_22.alt_region, cmp_22.alt_postal_code, cmp_22.alt_country, cmp_22.atlas_company_id, cmp_22.email, cmp_22.tax_type_id, cmp_22.redistributor_ind, cmp_22.operator_request, cmp_22.early_payment_discount, cmp_22.vip, cmp_22.deduction_contact_email, cmp_22.is_unipro, cmp_22.is_golbon, cmp_22.is_ima, cmp_22.cross_ship_company_id, cmp_22.tpo_ind, cmp_22.auto_submit_eclaim, cmp_22.auto_approve_eclaim
  • Index Cond: (cmp_22.company_id = cagg_22.agg_company_id)
630. 0.001 0.007 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=20) (actual time=0.007..0.007 rows=2 loops=1)

  • Output: ct_22.internal_company_type, ct_22.company_type_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
631. 0.006 0.006 ↑ 1.0 2 1

Seq Scan on client_elkay_plastics.company_type ct_22 (cost=0.00..1.02 rows=2 width=20) (actual time=0.006..0.006 rows=2 loops=1)

  • Output: ct_22.internal_company_type, ct_22.company_type_id
  • Buffers: shared hit=1
632. 0.001 0.020 ↓ 0.0 0 1

Subquery Scan on contractee_view_23 (cost=1,311.63..1,311.68 rows=3 width=32) (actual time=0.020..0.020 rows=0 loops=1)

  • Output: contractee_view_23.contract_id, contractee_view_23.company_id
  • Buffers: shared hit=3
633. 0.000 0.019 ↓ 0.0 0 1

Unique (cost=1,311.63..1,311.65 rows=3 width=36) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: cav_23.contract_amend_version_id, cmp_23.company_id, ct_23.internal_company_type
  • Buffers: shared hit=3
634. 0.003 0.019 ↓ 0.0 0 1

Sort (cost=1,311.63..1,311.64 rows=3 width=36) (actual time=0.019..0.019 rows=0 loops=1)

  • Output: cav_23.contract_amend_version_id, cmp_23.company_id, ct_23.internal_company_type
  • Sort Key: cmp_23.company_id, ct_23.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
635. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=1,126.98..1,311.61 rows=3 width=36) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: cav_23.contract_amend_version_id, cmp_23.company_id, ct_23.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=3
636. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=1,126.85..1,311.15 rows=3 width=48) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: cav_23.contract_amend_version_id, cmp_23.company_id, cmp_23.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=3
637. 0.001 0.015 ↓ 0.0 0 1

Nested Loop (cost=1,126.57..1,309.60 rows=5 width=32) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: cav_23.contract_amend_version_id, cagg_23.agg_company_id
  • Buffers: shared hit=3
638. 0.000 0.014 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,126.15..1,306.87 rows=2 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: c_23.contractee_company_id, cav_23.contract_amend_version_id, cg_65.company_id
  • Buffers: shared hit=3
639. 0.003 0.014 ↓ 0.0 0 1

Hash Right Join (cost=1,125.88..1,303.21 rows=1 width=48) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: c_23.contractee_company_id, cav_23.contract_amend_version_id, groupings_list_23.grouping_id
  • Hash Cond: (groupings_list_23.original_grouping_id = c_23.contractee_grouping_id)
  • Buffers: shared hit=3
640. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_23 (cost=1,118.69..1,223.77 rows=5,254 width=52) (never executed)

  • Output: groupings_list_23.original_grouping_id, NULL::uuid, groupings_list_23.grouping_id, NULL::integer
641.          

CTE groupings_list

642. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.00..1,118.69 rows=5,254 width=52) (never executed)

643. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_lactalis_retail_dairy.grouping_company pg_23 (cost=0.00..43.04 rows=104 width=52) (never executed)

  • Output: pg_23.grouping_id, pg_23.parent_grouping_id, pg_23.grouping_id, 0
644. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=33.80..97.06 rows=515 width=52) (never executed)

  • Output: gl_23.original_grouping_id, cg_23.parent_grouping_id, cg_23.grouping_id, (gl_23.level + 1)
  • Hash Cond: (cg_23.parent_grouping_id = gl_23.grouping_id)
645. 0.000 0.000 ↓ 0.0 0

Seq Scan on client_lactalis_retail_dairy.grouping_company cg_23 (cost=0.00..43.04 rows=104 width=32) (never executed)

  • Output: cg_23.grouping_id, cg_23.client_id, cg_23.grouping_description, cg_23.grouping_cd, cg_23.grouping_type, cg_23.parent_grouping_id, cg_23.active_ind, cg_23.company_type_id, cg_23.grouping_company_type
  • Filter: cg_23.active_ind
646. 0.000 0.000 ↓ 0.0 0

Hash (cost=20.80..20.80 rows=1,040 width=36) (never executed)

  • Output: gl_23.original_grouping_id, gl_23.level, gl_23.grouping_id
647. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on groupings_list gl_23 (cost=0.00..20.80 rows=1,040 width=36) (never executed)

  • Output: gl_23.original_grouping_id, gl_23.level, gl_23.grouping_id
648. 0.001 0.011 ↓ 0.0 0 1

Hash (cost=7.17..7.17 rows=1 width=48) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: c_23.contractee_grouping_id, c_23.contractee_company_id, cav_23.contract_amend_version_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=3
649. 0.000 0.010 ↓ 0.0 0 1

Nested Loop (cost=1.11..7.17 rows=1 width=48) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: c_23.contractee_grouping_id, c_23.contractee_company_id, cav_23.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=3
650. 0.001 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.84..6.87 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: crv_23.contract_family_id, cav_23.contract_amend_version_id
  • Inner Unique: true
  • Buffers: shared hit=3
651. 0.009 0.009 ↓ 0.0 0 1

Index Scan using contract_amend_version_pkey on client_lactalis_retail_dairy.contract_amend_version cav_23 (cost=0.42..3.44 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=1)

  • Output: cav_23.contract_amend_version_id, cav_23.contract_renew_version_id, cav_23.contract_state, cav_23.contract_amend_version_parent_id, cav_23.contract_name, cav_23.contact_name, cav_23.contact_email, cav_23.contact_phone, cav_23.create_timestamp, cav_23.amend_version
  • Index Cond: (cav_23.contract_amend_version_id = '571ef717-8ff3-47c4-ab2e-b6f826aebb56'::uuid)
  • Buffers: shared hit=3
652. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_pkey on client_lactalis_retail_dairy.contract_renew_version crv_23 (cost=0.42..3.44 rows=1 width=32) (never executed)

  • Output: crv_23.contract_renew_version_id, crv_23.contract_family_id, crv_23.date_range, crv_23.create_timestamp, crv_23.dead, crv_23.renew_version
  • Index Cond: (crv_23.contract_renew_version_id = cav_23.contract_renew_version_id)
653. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_lactalis_retail_dairy.contract_family c_23 (cost=0.28..0.30 rows=1 width=48) (never executed)

  • Output: c_23.contract_family_id, c_23.client_id, c_23.contractee_company_id, c_23.contractee_grouping_id, c_23.creator_id, c_23.contract_sequence, c_23.cost_basis_type, c_23.contract_type, c_23.contract_title, c_23.contract_template_id, c_23.payment_calendar_id, c_23.catch_all, c_23.accrual_quantity_source, c_23.import_contract_number, c_23.accrual_lumpsum_spread
  • Index Cond: (c_23.contract_family_id = crv_23.contract_family_id)
654. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_grouping_pkey on client_lactalis_retail_dairy.company_grouping cg_65 (cost=0.27..3.61 rows=5 width=32) (never executed)

  • Output: cg_65.company_id, cg_65.grouping_id
  • Index Cond: (cg_65.grouping_id = groupings_list_23.grouping_id)
  • Heap Fetches: 0
655. 0.000 0.000 ↓ 0.0 0

Index Only Scan using company_agg_pkey on client_lactalis_retail_dairy.company_agg cagg_23 (cost=0.41..1.34 rows=3 width=32) (never executed)

  • Output: cagg_23.company_id, cagg_23.agg_company_id
  • Index Cond: (cagg_23.company_id = COALESCE(c_23.contractee_company_id, cg_65.company_id))
  • Heap Fetches: 0
656. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on client_lactalis_retail_dairy.company cmp_23 (cost=0.28..0.31 rows=1 width=32) (never executed)

  • Output: cmp_23.company_id, cmp_23.client_id, cmp_23.company_name, cmp_23.company_number, cmp_23.company_type_id, cmp_23.active_ind, cmp_23.address_1, cmp_23.address_2, cmp_23.address_3, cmp_23.address_4, cmp_23.city, cmp_23.region, cmp_23.postal_code, cmp_23.country, cmp_23.company_agg_id, cmp_23.deduction_interval, cmp_23.alt_address_active, cmp_23.alt_address_1, cmp_23.alt_address_2, cmp_23.alt_address_3, cmp_23.alt_address_4, cmp_23.alt_city, cmp_23.alt_region, cmp_23.alt_postal_code, cmp_23.alt_country, cmp_23.atlas_company_id, cmp_23.email, cmp_23.tax_type_id, cmp_23.redistributor_ind, cmp_23.operator_request, cmp_23.early_payment_discount, cmp_23.vip, cmp_23.deduction_contact_email, cmp_23.is_unipro, cmp_23.is_golbon, cmp_23.is_ima, cmp_23.cross_ship_company_id, cmp_23.tpo_ind, cmp_23.auto_submit_eclaim, cmp_23.auto_approve_eclaim
  • Index Cond: (cmp_23.company_id = cagg_23.agg_company_id)
657. 0.000 0.000 ↓ 0.0 0

Index Scan using company_type_pkey on client_lactalis_retail_dairy.company_type ct_23 (cost=0.13..0.15 rows=1 width=20) (never executed)

  • Output: ct_23.company_type_id, ct_23.client_id, ct_23.company_type_description, ct_23.company_type_cd, ct_23.active_ind, ct_23.internal_company_type
  • Index Cond: (ct_23.company_type_id = cmp_23.company_type_id)
658. 0.001 0.018 ↓ 0.0 0 1

Subquery Scan on contractee_view_24 (cost=372.34..372.39 rows=3 width=32) (actual time=0.018..0.018 rows=0 loops=1)

  • Output: contractee_view_24.contract_id, contractee_view_24.company_id
  • Buffers: shared hit=2
659. 0.000 0.017 ↓ 0.0 0 1

Unique (cost=372.34..372.36 rows=3 width=36) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: cav_24.contract_amend_version_id, cmp_24.company_id, ct_24.internal_company_type
  • Buffers: shared hit=2
660. 0.003 0.017 ↓ 0.0 0 1

Sort (cost=372.34..372.35 rows=3 width=36) (actual time=0.017..0.017 rows=0 loops=1)

  • Output: cav_24.contract_amend_version_id, cmp_24.company_id, ct_24.internal_company_type
  • Sort Key: cmp_24.company_id, ct_24.internal_company_type
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2
661. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=339.34..372.31 rows=3 width=36) (actual time=0.014..0.014 rows=0 loops=1)

  • Output: cav_24.contract_amend_version_id, cmp_24.company_id, ct_24.internal_company_type
  • Inner Unique: true
  • Buffers: shared hit=2
662. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=339.21..371.87 rows=3 width=48) (actual time=0.013..0.014 rows=0 loops=1)

  • Output: cav_24.contract_amend_version_id, cmp_24.company_id, cmp_24.company_type_id
  • Inner Unique: true
  • Buffers: shared hit=2
663. 0.000 0.013 ↓ 0.0 0 1

Nested Loop (cost=338.93..369.97 rows=6 width=32) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: cav_24.contract_amend_version_id, cagg_24.agg_company_id
  • Buffers: shared hit=2
664. 0.001 0.013 ↓ 0.0 0 1

Nested Loop Left Join (cost=338.65..363.36 rows=6 width=48) (actual time=0.013..0.013 rows=0 loops=1)

  • Output: c_24.contractee_company_id, cav_24.contract_amend_version_id, cg_66.company_id
  • Buffers: shared hit=2
665. 0.004 0.012 ↓ 0.0 0 1

Hash Right Join (cost=338.37..353.20 rows=1 width=48) (actual time=0.012..0.012 rows=0 loops=1)

  • Output: c_24.contractee_company_id, cav_24.contract_amend_version_id, groupings_list_24.grouping_id
  • Hash Cond: (groupings_list_24.original_grouping_id = c_24.contractee_grouping_id)
  • Buffers: shared hit=2
666. 0.000 0.000 ↓ 0.0 0

CTE Scan on groupings_list groupings_list_24 (cost=331.58..340.36 rows=439 width=52) (never executed)

  • Output: groupings_list_24.original_grouping_id, NULL::uuid, groupings_list_24.grouping_id, NULL::integer
667.          

CTE groupings_list