explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i6Or

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 1,690.933 ↑ 281.5 2 1

Subquery Scan on claim_select_product (cost=115,106.44..115,113.48 rows=563 width=526) (actual time=1,690.932..1,690.933 rows=2 loops=1)

  • Output: claim_select_product.claim_product_id, claim_select_product.product_id, claim_select_product.product_name, claim_select_product.product_number, claim_select_product.uom_type_ids, claim_select_product.distributor_company_id, claim_select_product.distributor_company_name, claim_select_product.distributor_company_number, claim_select_product.uom_type_id, claim_select_product.rebate_calculated_rate, claim_select_product.rebate_requested_quantity, claim_select_product.rebate_requested_rate, claim_select_product.rebate_allowed_quantity, claim_select_product.rebate_allowed_rate, claim_select_product.price, claim_select_product.price_tier, claim_select_product.resolve_date, claim_select_product.claimant_contract_name, claim_select_product.contract_item_id, claim_select_product.contract_id, claim_select_product.contract_title, claim_select_product.contract_version_id, claim_select_product.won, claim_select_product.rebate_direct_type, claim_select_product.rebate_direct_decimal_model, claim_select_product.rebate_direct_value, claim_select_product.rebate_deviated_type, claim_select_product.rebate_deviated_decimal_model, claim_select_product.rebate_deviated_value, claim_select_product.distributor_invoice_number, claim_select_product.display_order
  • Buffers: shared hit=23986
2. 0.040 1,690.929 ↑ 281.5 2 1

Sort (cost=115,106.44..115,107.85 rows=563 width=534) (actual time=1,690.929..1,690.929 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, ((product.product_name)::text), ((product.product_number)::text), (array_agg(product_uom_conversion.uom_type_id)), claim_product.distributor_company_id, ((company.company_name)::text), ((company.company_number)::text), claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate))), ('DEFAULT'::enum.price_tier), claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, contract_amend_version.contract_amend_version_id, ((COALESCE(contract_family_1.contract_title, contract_family.contract_title))::text), ((((((contract_family_1.contract_sequence)::text || '.R'::text) || ((count(1)))::text) || '.A'::text) || ((count(1)))::text)), contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, (CASE WHEN (contract_item.rebate_direct_type = 'FIXED_RATE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_direct_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_direct_value / (tuomc_1.rate / suomc_1.rate)) WHEN (contract_item.rebate_direct_decimal_model = 'PERCENT'::enum.decimal_model) THEN contract_item.rebate_direct_value ELSE NULL::numeric END WHEN (contract_item.rebate_direct_type = 'FIXED_PRICE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_direct_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_direct_value / (tuomc_1.rate / suomc_1.rate)) ELSE NULL::numeric END ELSE NULL::numeric END), contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, (CASE WHEN (contract_item.rebate_deviated_type = 'FIXED_RATE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_deviated_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_deviated_value / (tuomc_1.rate / suomc_1.rate)) WHEN (contract_item.rebate_deviated_decimal_model = 'PERCENT'::enum.decimal_model) THEN contract_item.rebate_deviated_value ELSE NULL::numeric END WHEN (contract_item.rebate_deviated_type = 'FIXED_PRICE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_deviated_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_deviated_value / (tuomc_1.rate / suomc_1.rate)) ELSE NULL::numeric END ELSE NULL::numeric END), (COALESCE(claim_product.distributor_invoice_number, (string_agg(claim_product_location.distributor_invoice_number, ', '::text)))), ((cpo.display_order)::integer), cpo.display_order
  • Sort Key: cpo.display_order
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=23986
3. 156.163 1,690.889 ↑ 281.5 2 1

Merge Left Join (cost=8,791.61..115,080.72 rows=563 width=534) (actual time=1,372.981..1,690.889 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), claim_product.distributor_company_id, company.company_name, company.company_number, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate))), ('DEFAULT'::enum.price_tier), claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, contract_amend_version.contract_amend_version_id, COALESCE(contract_family_1.contract_title, contract_family.contract_title), (((((contract_family_1.contract_sequence)::text || '.R'::text) || ((count(1)))::text) || '.A'::text) || ((count(1)))::text), contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, CASE WHEN (contract_item.rebate_direct_type = 'FIXED_RATE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_direct_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_direct_value / (tuomc_1.rate / suomc_1.rate)) WHEN (contract_item.rebate_direct_decimal_model = 'PERCENT'::enum.decimal_model) THEN contract_item.rebate_direct_value ELSE NULL::numeric END WHEN (contract_item.rebate_direct_type = 'FIXED_PRICE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_direct_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_direct_value / (tuomc_1.rate / suomc_1.rate)) ELSE NULL::numeric END ELSE NULL::numeric END, contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, CASE WHEN (contract_item.rebate_deviated_type = 'FIXED_RATE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_deviated_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_deviated_value / (tuomc_1.rate / suomc_1.rate)) WHEN (contract_item.rebate_deviated_decimal_model = 'PERCENT'::enum.decimal_model) THEN contract_item.rebate_deviated_value ELSE NULL::numeric END WHEN (contract_item.rebate_deviated_type = 'FIXED_PRICE'::enum.rebate_value_type) THEN CASE WHEN (contract_item.rebate_deviated_decimal_model = 'NUMERIC'::enum.decimal_model) THEN (contract_item.rebate_deviated_value / (tuomc_1.rate / suomc_1.rate)) ELSE NULL::numeric END ELSE NULL::numeric END, COALESCE(claim_product.distributor_invoice_number, (string_agg(claim_product_location.distributor_invoice_number, ', '::text))), (cpo.display_order)::integer, cpo.display_order
  • Inner Unique: true
  • Merge Cond: (claim_product.claim_product_id = claim_product_location.claim_product_id)
  • Buffers: shared hit=23986
4. 0.004 8.209 ↑ 281.5 2 1

Merge Left Join (cost=8,791.05..8,794.38 rows=563 width=417) (actual time=8.205..8.209 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, ('DEFAULT'::enum.price_tier), product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), company.company_name, company.company_number, contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, contract_item.rebate_direct_value, contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, contract_item.rebate_deviated_value, contract_family_1.contract_title, contract_family_1.contract_sequence, contract_amend_version.contract_amend_version_id, (count(1)), (count(1)), suomc_1.rate, tuomc_1.rate, contract_family.contract_title, cpo.display_order, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Merge Cond: (claim_product.claim_product_id = cpo.claim_product_id)
  • Join Filter: (claim_product.claim_id = claim_product_order.claim_id)
  • Buffers: shared hit=3042
5. 0.019 8.182 ↑ 281.5 2 1

Sort (cost=8,782.29..8,783.70 rows=563 width=425) (actual time=8.181..8.182 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), company.company_name, company.company_number, contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, contract_item.rebate_direct_value, contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, contract_item.rebate_deviated_value, contract_family_1.contract_title, contract_family_1.contract_sequence, contract_amend_version.contract_amend_version_id, (count(1)), (count(1)), suomc_1.rate, tuomc_1.rate, contract_family.contract_title, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Sort Key: claim_product.claim_product_id
  • Sort Method: quicksort Memory: 26kB
  • Buffers: shared hit=3039
6. 0.044 8.163 ↑ 281.5 2 1

Hash Left Join (cost=1,678.02..8,756.57 rows=563 width=425) (actual time=4.311..8.163 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), company.company_name, company.company_number, contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, contract_item.rebate_direct_value, contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, contract_item.rebate_deviated_value, contract_family_1.contract_title, contract_family_1.contract_sequence, contract_amend_version.contract_amend_version_id, (count(1)), (count(1)), suomc_1.rate, tuomc_1.rate, contract_family.contract_title, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Inner Unique: true
  • Hash Cond: (claim.contract_sequence = contract_family.contract_sequence)
  • Buffers: shared hit=3039
7. 0.197 5.567 ↑ 281.5 2 1

Merge Left Join (cost=1,319.22..8,396.29 rows=563 width=399) (actual time=1.716..5.567 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), company.company_name, company.company_number, contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, contract_item.rebate_direct_value, contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, contract_item.rebate_deviated_value, contract_family_1.contract_title, contract_family_1.contract_sequence, contract_amend_version.contract_amend_version_id, (count(1)), (count(1)), suomc_1.rate, tuomc_1.rate, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Merge Cond: (claim_product.product_id = pro_1.product_id)
  • Join Filter: ((contract_item.uom_type_id = suomc_1.uom_type_id) AND (claim_product.uom_type_id = tuomc_1.uom_type_id))
  • Rows Removed by Join Filter: 2
  • Buffers: shared hit=2808
8. 0.003 2.520 ↑ 281.5 2 1

Nested Loop Left Join (cost=1,317.84..8,039.48 rows=563 width=405) (actual time=1.386..2.520 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), company.company_name, company.company_number, contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, contract_item.rebate_direct_value, contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, contract_item.rebate_deviated_value, contract_item.uom_type_id, contract_family_1.contract_title, contract_family_1.contract_sequence, contract_amend_version.contract_amend_version_id, (count(1)), (count(1)), ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Buffers: shared hit=101
9. 0.004 2.507 ↑ 281.5 2 1

Nested Loop Left Join (cost=1,309.74..3,382.83 rows=563 width=355) (actual time=1.376..2.507 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), company.company_name, company.company_number, contract_item.won, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, contract_item.rebate_direct_value, contract_item.rebate_deviated_type, contract_item.rebate_deviated_decimal_model, contract_item.rebate_deviated_value, contract_item.contract_id, contract_item.uom_type_id, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Inner Unique: true
  • Buffers: shared hit=101
10. 0.120 2.499 ↑ 281.5 2 1

Merge Join (cost=1,309.32..1,454.08 rows=563 width=299) (actual time=1.371..2.499 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, product.product_name, product.product_number, (array_agg(product_uom_conversion.uom_type_id)), company.company_name, company.company_number, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Inner Unique: true
  • Merge Cond: (claim_product.product_id = product_uom_conversion.product_id)
  • Buffers: shared hit=101
11. 0.013 1.239 ↑ 53.0 2 1

Sort (cost=1,309.04..1,309.30 rows=106 width=283) (actual time=1.239..1.239 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, product.product_name, product.product_number, product.product_id, company.company_name, company.company_number, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Sort Key: claim_product.product_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=90
12. 0.002 1.226 ↑ 53.0 2 1

Nested Loop Left Join (cost=128.50..1,305.47 rows=106 width=283) (actual time=1.209..1.226 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, product.product_name, product.product_number, product.product_id, company.company_name, company.company_number, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Inner Unique: true
  • Buffers: shared hit=90
13. 0.025 1.212 ↑ 53.0 2 1

Hash Join (cost=128.22..1,081.41 rows=106 width=252) (actual time=1.198..1.212 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, product.product_name, product.product_number, product.product_id, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Inner Unique: true
  • Hash Cond: (claim_product.product_id = product.product_id)
  • Buffers: shared hit=84
14. 0.002 0.089 ↑ 53.0 2 1

Nested Loop (cost=2.67..955.58 rows=106 width=198) (actual time=0.076..0.089 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), claim.contract_sequence, ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Buffers: shared hit=15
15. 0.018 0.018 ↑ 1.0 1 1

Index Scan using claim_pkey on client_pinnacle.claim (cost=0.42..3.44 rows=1 width=20) (actual time=0.017..0.018 rows=1 loops=1)

  • Output: claim.claim_id, claim.invoice_id, claim.claim_state, claim.claim_sequence, claim.transaction_type, claim.contract_sequence, claim.claim_tag
  • Index Cond: (claim.claim_id = '759f36df-f241-4c3c-bd35-6cb259df804a'::uuid)
  • Buffers: shared hit=4
16. 0.003 0.069 ↑ 53.0 2 1

Nested Loop Left Join (cost=2.25..951.09 rows=106 width=194) (actual time=0.057..0.069 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, ('DEFAULT'::enum.price_tier), ((CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate)))
  • Join Filter: (claim_product.uom_type_id = tuomc.uom_type_id)
  • Buffers: shared hit=11
17. 0.003 0.030 ↑ 53.0 2 1

Nested Loop Left Join (cost=0.86..527.91 rows=106 width=174) (actual time=0.023..0.030 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id, claim_product_price.price_id
  • Inner Unique: true
  • Buffers: shared hit=11
18. 0.015 0.015 ↑ 53.0 2 1

Index Scan using claim_product_claim_id_idx on client_pinnacle.claim_product (cost=0.43..162.74 rows=106 width=158) (actual time=0.012..0.015 rows=2 loops=1)

  • Output: claim_product.claim_product_id, claim_product.product_id, claim_product.distributor_company_id, claim_product.uom_type_id, claim_product.rebate_calculated_rate, claim_product.rebate_requested_quantity, claim_product.rebate_requested_rate, claim_product.rebate_allowed_quantity, claim_product.rebate_allowed_rate, claim_product.resolve_date, claim_product.claimant_contract_name, claim_product.contract_item_id, claim_product.distributor_invoice_number, claim_product.claim_id
  • Index Cond: (claim_product.claim_id = '759f36df-f241-4c3c-bd35-6cb259df804a'::uuid)
  • Buffers: shared hit=5
19. 0.012 0.012 ↓ 0.0 0 2

Index Scan using claim_product_price_unique on client_pinnacle.claim_product_price (cost=0.43..3.45 rows=1 width=32) (actual time=0.006..0.006 rows=0 loops=2)

  • Output: claim_product_price.claim_product_id, claim_product_price.price_id
  • Index Cond: (claim_product.claim_product_id = claim_product_price.claim_product_id)
  • Buffers: shared hit=6
20. 0.000 0.036 ↓ 0.0 0 2

Nested Loop Left Join (cost=1.40..3.98 rows=1 width=68) (actual time=0.018..0.018 rows=0 loops=2)

  • Output: ('DEFAULT'::enum.price_tier), price_default.price_id, tuomc.uom_type_id, (CASE WHEN (pm.math_operation_value IS NULL) THEN price_default.price WHEN (pm.math_operation IS NULL) THEN price_default.price WHEN (pm.math_operation = 'ADD'::enum.math_operation) THEN (price_default.price + pm.math_operation_value) WHEN (pm.math_operation = 'SUBTRACT'::enum.math_operation) THEN (price_default.price - pm.math_operation_value) WHEN (pm.math_operation = 'MULTIPLY'::enum.math_operation) THEN (price_default.price * pm.math_operation_value) ELSE price_default.price END / (tuomc.rate / suomc.rate))
21. 0.000 0.036 ↓ 0.0 0 2

Nested Loop (cost=1.12..3.65 rows=1 width=54) (actual time=0.018..0.018 rows=0 loops=2)

  • Output: ('DEFAULT'::enum.price_tier), price_default.price_id, price_default.price, suomc.rate, tuomc.uom_type_id, tuomc.rate
  • Join Filter: (pro.product_id = tuomc.product_id)
22. 0.002 0.036 ↓ 0.0 0 2

Nested Loop (cost=0.84..3.34 rows=1 width=81) (actual time=0.018..0.018 rows=0 loops=2)

  • Output: ('DEFAULT'::enum.price_tier), price_default.product_id, price_default.price_id, price_default.price, pro.product_id, suomc.product_id, suomc.rate
  • Inner Unique: true
  • Join Filter: (suomc.product_id = pro.product_id)
23. 0.000 0.034 ↓ 0.0 0 2

Nested Loop (cost=0.56..3.03 rows=1 width=65) (actual time=0.017..0.017 rows=0 loops=2)

  • Output: ('DEFAULT'::enum.price_tier), price_default.product_id, price_default.price_id, price_default.price, suomc.product_id, suomc.rate
  • Inner Unique: true
24. 0.004 0.034 ↓ 0.0 0 2

Append (cost=0.28..1.53 rows=5 width=60) (actual time=0.017..0.017 rows=0 loops=2)

25. 0.008 0.008 ↓ 0.0 0 2

Index Scan using price_default_pkey on client_pinnacle.price_default (cost=0.28..0.30 rows=1 width=58) (actual time=0.004..0.004 rows=0 loops=2)

  • Output: 'DEFAULT'::enum.price_tier, price_default.product_id, price_default.uom_type_id, price_default.price_id, price_default.price
  • Index Cond: (claim_product_price.price_id = price_default.price_id)
26. 0.006 0.006 ↓ 0.0 0 2

Index Scan using price_generated_pkey on client_pinnacle.price_sale (cost=0.43..0.47 rows=1 width=60) (actual time=0.003..0.003 rows=0 loops=2)

  • Output: 'SALE'::enum.price_tier, price_sale.product_id, price_sale.uom_type_id, price_sale.price_id, price_sale.price
  • Index Cond: (claim_product_price.price_id = price_sale.price_id)
27. 0.004 0.004 ↓ 0.0 0 2

Index Scan using price_company_pkey on client_pinnacle.price_company (cost=0.29..0.30 rows=1 width=58) (actual time=0.002..0.002 rows=0 loops=2)

  • Output: 'COMPANY'::enum.price_tier, price_company.product_id, price_company.uom_type_id, price_company.price_id, price_company.price
  • Index Cond: (claim_product_price.price_id = price_company.price_id)
28. 0.006 0.006 ↓ 0.0 0 2

Index Scan using price_list_pkey on client_pinnacle.price_list (cost=0.15..0.17 rows=1 width=84) (actual time=0.003..0.003 rows=0 loops=2)

  • Output: 'LIST'::enum.price_tier, price_list.product_id, price_list.uom_type_id, price_list.price_id, price_list.price
  • Index Cond: (claim_product_price.price_id = price_list.price_id)
29. 0.006 0.006 ↓ 0.0 0 2

Index Scan using price_class_pkey on client_pinnacle.price_class (cost=0.28..0.30 rows=1 width=58) (actual time=0.003..0.003 rows=0 loops=2)

  • Output: 'CLASS'::enum.price_tier, price_class.product_id, price_class.uom_type_id, price_class.price_id, price_class.price
  • Index Cond: (claim_product_price.price_id = price_class.price_id)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using product_uom_conversion_pkey on client_pinnacle.product_uom_conversion suomc (cost=0.28..0.30 rows=1 width=37) (never executed)

  • Output: suomc.product_id, suomc.uom_type_id, suomc.rate
  • Index Cond: ((suomc.product_id = price_default.product_id) AND (suomc.uom_type_id = price_default.uom_type_id))
31. 0.000 0.000 ↓ 0.0 0

Index Only Scan using product_pkey on client_pinnacle.product pro (cost=0.28..0.30 rows=1 width=16) (never executed)

  • Output: pro.product_id
  • Index Cond: (pro.product_id = price_default.product_id)
  • Heap Fetches: 0
32. 0.000 0.000 ↓ 0.0 0

Index Scan using product_uom_conversion_pkey on client_pinnacle.product_uom_conversion tuomc (cost=0.28..0.30 rows=1 width=37) (never executed)

  • Output: tuomc.product_id, tuomc.uom_type_id, tuomc.rate
  • Index Cond: (tuomc.product_id = price_default.product_id)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using price_modified_excl on client_pinnacle.price_modified pm (cost=0.28..0.30 rows=1 width=27) (never executed)

  • Output: pm.price_id, pm.math_operation_value, pm.math_operation
  • Index Cond: (price_default.price_id = pm.price_id)
  • Filter: upper_inf(pm.active_range)
34. 0.624 1.098 ↑ 1.0 2,513 1

Hash (cost=94.13..94.13 rows=2,513 width=54) (actual time=1.098..1.098 rows=2,513 loops=1)

  • Output: product.product_name, product.product_number, product.product_id
  • Buckets: 4096 Batches: 1 Memory Usage: 247kB
  • Buffers: shared hit=69
35. 0.474 0.474 ↑ 1.0 2,513 1

Seq Scan on client_pinnacle.product (cost=0.00..94.13 rows=2,513 width=54) (actual time=0.006..0.474 rows=2,513 loops=1)

  • Output: product.product_name, product.product_number, product.product_id
  • Buffers: shared hit=69
36. 0.012 0.012 ↑ 1.0 1 2

Index Scan using company_pkey on client_pinnacle.company (cost=0.29..2.11 rows=1 width=47) (actual time=0.006..0.006 rows=1 loops=2)

  • Output: company.company_id, company.client_id, company.company_name, company.company_number, company.company_type_id, company.active_ind, company.address_1, company.address_2, company.address_3, company.address_4, company.city, company.region, company.postal_code, company.country, company.company_agg_id, company.deduction_interval, company.alt_address_active, company.alt_address_1, company.alt_address_2, company.alt_address_3, company.alt_address_4, company.alt_city, company.alt_region, company.alt_postal_code, company.alt_country, company.atlas_company_id, company.email, company.tax_type_id, company.redistributor_ind, company.operator_request, company.early_payment_discount, company.vip
  • Index Cond: (claim_product.distributor_company_id = company.company_id)
  • Buffers: shared hit=6
37. 0.937 1.140 ↑ 1.8 1,404 1

GroupAggregate (cost=0.28..107.47 rows=2,513 width=48) (actual time=0.026..1.140 rows=1,404 loops=1)

  • Output: product_uom_conversion.product_id, array_agg(product_uom_conversion.uom_type_id)
  • Group Key: product_uom_conversion.product_id
  • Buffers: shared hit=11
38. 0.203 0.203 ↑ 1.8 1,406 1

Index Only Scan using product_uom_conversion_pkey on client_pinnacle.product_uom_conversion (cost=0.28..63.49 rows=2,514 width=32) (actual time=0.015..0.203 rows=1,406 loops=1)

  • Output: product_uom_conversion.product_id, product_uom_conversion.uom_type_id
  • Heap Fetches: 0
  • Buffers: shared hit=11
39. 0.004 0.004 ↓ 0.0 0 2

Index Scan using contract_item_pkey on client_pinnacle.contract_item (cost=0.42..3.43 rows=1 width=72) (actual time=0.002..0.002 rows=0 loops=2)

  • Output: contract_item.contract_item_id, contract_item.contract_id, contract_item.product_id, contract_item.grouping_id, contract_item.estimated_quantity, contract_item.uom_type_id, contract_item.rebate_deviated_value, contract_item.rebate_deviated_type, contract_item.inactive_override, contract_item.rebate_direct_value, contract_item.rebate_direct_type, contract_item.rebate_direct_decimal_model, contract_item.rebate_deviated_decimal_model, contract_item.won, contract_item.rebate_growth_type, contract_item.rebate_growth_decimal_model
  • Index Cond: (claim_product.contract_item_id = contract_item.contract_item_id)
40. 0.000 0.010 ↓ 0.0 0 2

Nested Loop Left Join (cost=8.10..8.26 rows=1 width=66) (actual time=0.005..0.005 rows=0 loops=2)

  • Output: contract_family_1.contract_title, contract_family_1.contract_sequence, contract_amend_version.contract_amend_version_id, (count(1)), (count(1))
41. 0.002 0.010 ↓ 0.0 0 2

Nested Loop Left Join (cost=4.79..4.92 rows=1 width=82) (actual time=0.005..0.005 rows=0 loops=2)

  • Output: contract_family_1.contract_title, contract_family_1.contract_sequence, contract_amend_version.contract_amend_version_id, contract_amend_version.contract_renew_version_id, contract_amend_version.create_timestamp, (count(1))
42. 0.000 0.008 ↓ 0.0 0 2

Nested Loop (cost=0.85..0.96 rows=1 width=98) (actual time=0.004..0.004 rows=0 loops=2)

  • Output: contract_family_1.contract_title, contract_family_1.contract_sequence, contract_renew_version.contract_family_id, contract_renew_version.create_timestamp, contract_amend_version.contract_amend_version_id, contract_amend_version.contract_renew_version_id, contract_amend_version.create_timestamp
  • Inner Unique: true
43. 0.000 0.008 ↓ 0.0 0 2

Nested Loop (cost=0.57..0.63 rows=1 width=64) (actual time=0.004..0.004 rows=0 loops=2)

  • Output: contract_renew_version.contract_family_id, contract_renew_version.create_timestamp, contract_amend_version.contract_amend_version_id, contract_amend_version.contract_renew_version_id, contract_amend_version.create_timestamp
  • Inner Unique: true
44. 0.008 0.008 ↓ 0.0 0 2

Index Scan using contract_amend_version_pkey on client_pinnacle.contract_amend_version (cost=0.29..0.31 rows=1 width=40) (actual time=0.004..0.004 rows=0 loops=2)

  • Output: contract_amend_version.contract_amend_version_id, contract_amend_version.contract_renew_version_id, contract_amend_version.contract_state, contract_amend_version.contract_amend_version_parent_id, contract_amend_version.contract_name, contract_amend_version.contact_name, contract_amend_version.contact_email, contract_amend_version.contact_phone, contract_amend_version.create_timestamp
  • Index Cond: (contract_item.contract_id = contract_amend_version.contract_amend_version_id)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_version_pkey on client_pinnacle.contract_renew_version (cost=0.29..0.32 rows=1 width=40) (never executed)

  • Output: contract_renew_version.contract_renew_version_id, contract_renew_version.contract_family_id, contract_renew_version.date_range, contract_renew_version.create_timestamp, contract_renew_version.dead
  • Index Cond: (contract_renew_version.contract_renew_version_id = contract_amend_version.contract_renew_version_id)
46. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_family_pkey on client_pinnacle.contract_family contract_family_1 (cost=0.28..0.33 rows=1 width=50) (never executed)

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

Aggregate (cost=3.93..3.94 rows=1 width=8) (never executed)

  • Output: count(1)
48. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_renew_version_contract_family_id_idx on client_pinnacle.contract_renew_version crv2_1 (cost=0.29..3.93 rows=1 width=0) (never executed)

  • Output: crv2_1.contract_renew_version_id, crv2_1.contract_family_id, crv2_1.date_range, crv2_1.create_timestamp, crv2_1.dead
  • Index Cond: (contract_renew_version.contract_family_id = crv2_1.contract_family_id)
  • Filter: (crv2_1.create_timestamp < contract_renew_version.create_timestamp)
49. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=3.31..3.32 rows=1 width=8) (never executed)

  • Output: count(1)
50. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_amend_version_contract_renew_version_id_idx1 on client_pinnacle.contract_amend_version cav2_1 (cost=0.29..3.31 rows=1 width=0) (never executed)

  • Output: cav2_1.contract_amend_version_id, cav2_1.contract_renew_version_id, cav2_1.contract_state, cav2_1.contract_amend_version_parent_id, cav2_1.contract_name, cav2_1.contact_name, cav2_1.contact_email, cav2_1.contact_phone, cav2_1.create_timestamp
  • Index Cond: (contract_amend_version.contract_renew_version_id = cav2_1.contract_renew_version_id)
  • Filter: (cav2_1.create_timestamp < contract_amend_version.create_timestamp)
51. 0.294 2.850 ↑ 1.8 1,408 1

Materialize (cost=0.84..341.21 rows=2,515 width=58) (actual time=0.039..2.850 rows=1,408 loops=1)

  • Output: pro_1.product_id, suomc_1.rate, suomc_1.uom_type_id, tuomc_1.rate, tuomc_1.uom_type_id
  • Buffers: shared hit=2707
52. 0.542 2.556 ↑ 1.8 1,408 1

Merge Join (cost=0.84..334.92 rows=2,515 width=58) (actual time=0.035..2.556 rows=1,408 loops=1)

  • Output: pro_1.product_id, suomc_1.rate, suomc_1.uom_type_id, tuomc_1.rate, tuomc_1.uom_type_id
  • Merge Cond: (pro_1.product_id = tuomc_1.product_id)
  • Buffers: shared hit=2707
53. 0.589 1.364 ↑ 1.8 1,406 1

Merge Join (cost=0.56..202.17 rows=2,514 width=53) (actual time=0.024..1.364 rows=1,406 loops=1)

  • Output: pro_1.product_id, suomc_1.rate, suomc_1.product_id, suomc_1.uom_type_id
  • Inner Unique: true
  • Merge Cond: (suomc_1.product_id = pro_1.product_id)
  • Buffers: shared hit=1359
54. 0.564 0.564 ↑ 1.8 1,406 1

Index Scan using product_uom_conversion_pkey on client_pinnacle.product_uom_conversion suomc_1 (cost=0.28..94.99 rows=2,514 width=37) (actual time=0.011..0.564 rows=1,406 loops=1)

  • Output: suomc_1.product_id, suomc_1.uom_type_id, suomc_1.rate
  • Buffers: shared hit=1346
55. 0.211 0.211 ↑ 1.8 1,405 1

Index Only Scan using product_pkey on client_pinnacle.product pro_1 (cost=0.28..69.47 rows=2,513 width=16) (actual time=0.013..0.211 rows=1,405 loops=1)

  • Output: pro_1.product_id
  • Heap Fetches: 0
  • Buffers: shared hit=13
56. 0.650 0.650 ↑ 1.8 1,408 1

Index Scan using product_uom_conversion_pkey on client_pinnacle.product_uom_conversion tuomc_1 (cost=0.28..94.99 rows=2,514 width=37) (actual time=0.010..0.650 rows=1,408 loops=1)

  • Output: tuomc_1.product_id, tuomc_1.uom_type_id, tuomc_1.rate
  • Buffers: shared hit=1348
57. 1.222 2.552 ↑ 1.0 5,680 1

Hash (cost=287.80..287.80 rows=5,680 width=34) (actual time=2.552..2.552 rows=5,680 loops=1)

  • Output: contract_family.contract_title, contract_family.contract_sequence
  • Buckets: 8192 Batches: 1 Memory Usage: 439kB
  • Buffers: shared hit=231
58. 1.330 1.330 ↑ 1.0 5,680 1

Seq Scan on client_pinnacle.contract_family (cost=0.00..287.80 rows=5,680 width=34) (actual time=0.009..1.330 rows=5,680 loops=1)

  • Output: contract_family.contract_title, contract_family.contract_sequence
  • Buffers: shared hit=231
59. 0.012 0.023 ↓ 0.0 0 1

Sort (cost=8.76..9.01 rows=100 width=40) (actual time=0.023..0.023 rows=0 loops=1)

  • Output: claim_product_order.claim_id, cpo.display_order, cpo.claim_product_id
  • Sort Key: cpo.claim_product_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
60. 0.000 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.42..5.44 rows=100 width=40) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: claim_product_order.claim_id, cpo.display_order, cpo.claim_product_id
  • Buffers: shared hit=3
61. 0.011 0.011 ↓ 0.0 0 1

Index Scan using claim_product_order_pkey on client_pinnacle.claim_product_order (cost=0.42..3.44 rows=1 width=143) (actual time=0.010..0.011 rows=0 loops=1)

  • Output: claim_product_order.claim_id, claim_product_order.item_ids
  • Index Cond: (claim_product_order.claim_id = '759f36df-f241-4c3c-bd35-6cb259df804a'::uuid)
  • Buffers: shared hit=3
62. 0.000 0.000 ↓ 0.0 0

Function Scan on pg_catalog.unnest cpo (cost=0.00..1.00 rows=100 width=24) (never executed)

  • Output: cpo.claim_product_id, cpo.display_order
  • Function Call: unnest(claim_product_order.item_ids)
63. 1,125.812 1,526.517 ↓ 3.1 1,860,939 1

GroupAggregate (cost=0.56..98,751.58 rows=599,343 width=48) (actual time=0.026..1,526.517 rows=1,860,939 loops=1)

  • Output: claim_product_location.claim_product_id, string_agg(claim_product_location.distributor_invoice_number, ', '::text)
  • Group Key: claim_product_location.claim_product_id
  • Buffers: shared hit=20944
64. 400.705 400.705 ↑ 1.0 2,938,249 1

Index Only Scan using claim_product_location_pkey on client_pinnacle.claim_product_location (cost=0.56..76,439.98 rows=2,963,962 width=17) (actual time=0.018..400.705 rows=2,938,249 loops=1)

  • Output: claim_product_location.claim_product_id, claim_product_location.location_id, claim_product_location.distributor_invoice_number
  • Heap Fetches: 0
  • Buffers: shared hit=20944