explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bWbD

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

WindowAgg (cost=3,796,110.71..4,020,324.56 rows=49,770 width=349) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, yaml_field(cs.lead_text, ' Fee'::text), yaml_field(cs.lead_text, 'home_state'::text), cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, me.selected_lead_offer_id, me.submitted_interstitial_page, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, lst.price, l.amount, l.id, l.status_cd, CASE WHEN CASE WHEN ((l.status_cd)::text = ANY ('{issued,issued_pmt_proc,in_default,in_default_pmt_proc,paid_off,charge_off,sold}'::text[])) THEN true WHEN ((l.status_cd)::text = ANY ('{approved,on_hold,applied,withdrawn,declined}'::text[])) THEN false ELSE NULL::boolean END THEN 1 ELSE 0 END, CASE WHEN (l.id IS NOT NULL) THEN 1 ELSE 0 END, (ap.credit_model_result_id IS NOT NULL), ap.status_cd, omr.loan_application_id, cs.requested_loan_amount, xpath_number(omr.request_body, '/LeadInformation/ConsumerProfileInformation/Credit/AssignedCreditValue/text()'::text), xpath_number(omr.request_body, '/LeadInformation/LoanInformation/LoanAmount/text()'::text), CASE WHEN (l2.id IS NOT NULL) THEN 1 ELSE 0 END, COALESCE(lst.price, (yaml_field(cs.lead_text, ' Fee'::text))::integer), CASE WHEN (ce.upswing_flg IS TRUE) THEN true ELSE false END, CASE WHEN ((row_number() OVER (?)) = 1) THEN 1 ELSE 0 END, COALESCE((SubPlan 1), '0'::bigint), CASE WHEN (me.submitted_interstitial_page AND (ap.profitability_rate IS NOT NULL)) THEN 1 ELSE 0 END, CASE WHEN (me.submitted_interstitial_page AND (ap.profitability_rate IS NOT NULL)) THEN CASE WHEN ((ap.status_cd)::text = 'approved'::text) THEN 1 ELSE 0 END ELSE 0 END, CASE WHEN (l.id IS NOT NULL) THEN row_number() OVER (?) ELSE NULL::bigint END, (yaml_field(cs.lead_text, 'ssn'::text)), ((cs.received_time)::date)
2. 0.000 0.000 ↓ 0.0

Sort (cost=3,796,110.71..3,796,235.14 rows=49,770 width=3,461) (actual rows= loops=)

  • Output: cs.id, l.id, (yaml_field(cs.lead_text, 'ssn'::text)), ((cs.received_time)::date), cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, me.selected_lead_offer_id, me.submitted_interstitial_page, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, lst.price, l.amount, l.status_cd, ap.credit_model_result_id, ap.status_cd, omr.loan_application_id, cs.requested_loan_amount, omr.request_body, l2.id, ce.upswing_flg, ap.profitability_rate, (row_number() OVER (?))
  • Sort Key: l.id, cs.id DESC
3. 0.000 0.000 ↓ 0.0

WindowAgg (cost=3,778,541.16..3,792,227.91 rows=49,770 width=3,461) (actual rows= loops=)

  • Output: cs.id, l.id, (yaml_field(cs.lead_text, 'ssn'::text)), ((cs.received_time)::date), cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, me.selected_lead_offer_id, me.submitted_interstitial_page, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, lst.price, l.amount, l.status_cd, ap.credit_model_result_id, ap.status_cd, omr.loan_application_id, cs.requested_loan_amount, omr.request_body, l2.id, ce.upswing_flg, ap.profitability_rate, row_number() OVER (?)
4. 0.000 0.000 ↓ 0.0

Sort (cost=3,778,541.16..3,778,665.58 rows=49,770 width=3,453) (actual rows= loops=)

  • Output: cs.id, l.id, (yaml_field(cs.lead_text, 'ssn'::text)), ((cs.received_time)::date), cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, me.selected_lead_offer_id, me.submitted_interstitial_page, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, lst.price, l.amount, l.status_cd, ap.credit_model_result_id, ap.status_cd, omr.loan_application_id, cs.requested_loan_amount, omr.request_body, l2.id, ce.upswing_flg, ap.profitability_rate
  • Sort Key: (yaml_field(cs.lead_text, 'ssn'::text)), ((cs.received_time)::date), cs.id DESC
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=97,269.45..3,774,658.35 rows=49,770 width=3,453) (actual rows= loops=)

  • Output: cs.id, l.id, yaml_field(cs.lead_text, 'ssn'::text), (cs.received_time)::date, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, me.selected_lead_offer_id, me.submitted_interstitial_page, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, lst.price, l.amount, l.status_cd, ap.credit_model_result_id, ap.status_cd, omr.loan_application_id, cs.requested_loan_amount, omr.request_body, l2.id, ce.upswing_flg, ap.profitability_rate
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=97,264.91..3,534,993.11 rows=49,770 width=3,416) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, lst.price, me.selected_lead_offer_id, me.submitted_interstitial_page, omr.loan_application_id, omr.request_body, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, ap.credit_model_result_id, ap.status_cd, ap.profitability_rate, l.amount, l.id, l.status_cd, l2.id
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=97,255.06..2,958,445.11 rows=49,770 width=3,412) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, lst.price, me.selected_lead_offer_id, me.submitted_interstitial_page, omr.loan_application_id, omr.request_body, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, ap.credit_model_result_id, ap.status_cd, ap.profitability_rate, l.amount, l.id, l.status_cd
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=97,210.05..581,023.40 rows=49,770 width=3,394) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, lst.price, me.selected_lead_offer_id, me.submitted_interstitial_page, omr.loan_application_id, omr.request_body, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, ap.credit_model_result_id, ap.status_cd, ap.profitability_rate
9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=97,205.87..228,994.62 rows=49,770 width=3,373) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, lst.price, me.selected_lead_offer_id, me.submitted_interstitial_page, omr.loan_application_id, omr.request_body, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code
  • Hash Cond: ((SubPlan 2) = lob.id)
10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=87,904.23..133,030.97 rows=49,770 width=3,343) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, lst.price, me.selected_lead_offer_id, me.submitted_interstitial_page, omr.loan_application_id, omr.request_body, lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code
  • Hash Cond: (me.selected_lead_offer_id = lo.id)
11. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=78,602.59..123,504.23 rows=49,770 width=3,313) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, lst.price, me.selected_lead_offer_id, me.submitted_interstitial_page, omr.loan_application_id, omr.request_body
  • Hash Cond: (cs.id = me.customer_source_id)
12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=76,917.73..121,632.62 rows=49,770 width=3,308) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, lst.price, omr.loan_application_id, omr.request_body
  • Hash Cond: (cs.lead_seller_tier_id = lst.id)
13. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=76,693.37..120,776.57 rows=49,770 width=3,304) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount, omr.loan_application_id, omr.request_body
  • Hash Cond: (omr.customer_source_id = cs.id)
14. 0.000 0.000 ↓ 0.0

Seq Scan on private.offer_model_requests omr (cost=0.00..43,332.88 rows=199,988 width=1,791) (actual rows= loops=)

  • Output: omr.id, omr.customer_source_id, omr.created_by, omr.updated_by, omr.created_on, omr.updated_on, omr.request_body, omr.request_id, omr.response_body, omr.response_code, omr.loan_application_id, omr.lead_seller_id
15. 0.000 0.000 ↓ 0.0

Hash (cost=76,071.24..76,071.24 rows=49,770 width=1,517) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount
16. 0.000 0.000 ↓ 0.0

Index Scan using customer_sources_m3 on private.customer_sources cs (cost=0.70..76,071.24 rows=49,770 width=1,517) (actual rows= loops=)

  • Output: cs.id, cs.lead_seller_tier_id, cs.lead_text, cs.lead_source, cs.source_type_cd, cs.sub_type_cd, cs.type_cd, cs.received_time, cs.customer_id, cs.requested_loan_amount
  • Index Cond: ((cs.source_type_cd)::text = 'lendingtree'::text)
17. 0.000 0.000 ↓ 0.0

Hash (cost=128.05..128.05 rows=7,705 width=8) (actual rows= loops=)

  • Output: lst.price, lst.id
18. 0.000 0.000 ↓ 0.0

Seq Scan on cnu.lead_seller_tiers lst (cost=0.00..128.05 rows=7,705 width=8) (actual rows= loops=)

  • Output: lst.price, lst.id
19. 0.000 0.000 ↓ 0.0

Hash (cost=933.27..933.27 rows=60,127 width=9) (actual rows= loops=)

  • Output: me.selected_lead_offer_id, me.submitted_interstitial_page, me.customer_source_id
20. 0.000 0.000 ↓ 0.0

Seq Scan on offer_model.extras me (cost=0.00..933.27 rows=60,127 width=9) (actual rows= loops=)

  • Output: me.selected_lead_offer_id, me.submitted_interstitial_page, me.customer_source_id
21. 0.000 0.000 ↓ 0.0

Hash (cost=6,350.73..6,350.73 rows=236,073 width=34) (actual rows= loops=)

  • Output: lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lo.id
22. 0.000 0.000 ↓ 0.0

Seq Scan on cnu.lead_offers lo (cost=0.00..6,350.73 rows=236,073 width=34) (actual rows= loops=)

  • Output: lo.apr, lo.interest_rate, lo.loan_type_cd, lo.decision_code, lo.id
23. 0.000 0.000 ↓ 0.0

Hash (cost=6,350.73..6,350.73 rows=236,073 width=34) (actual rows= loops=)

  • Output: lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, lob.id
24. 0.000 0.000 ↓ 0.0

Seq Scan on cnu.lead_offers lob (cost=0.00..6,350.73 rows=236,073 width=34) (actual rows= loops=)

  • Output: lob.apr, lob.interest_rate, lob.loan_type_cd, lob.decision_code, lob.id
25.          

SubPlan (forHash Left Join)

26. 0.000 0.000 ↓ 0.0

Limit (cost=3.45..3.45 rows=1 width=11) (actual rows= loops=)

  • Output: lead_offers_1.id, (((lead_offers_1.decision_code)::text = 'accepted'::text)), lead_offers_1.apr
27. 0.000 0.000 ↓ 0.0

Sort (cost=3.45..3.45 rows=1 width=11) (actual rows= loops=)

  • Output: lead_offers_1.id, (((lead_offers_1.decision_code)::text = 'accepted'::text)), lead_offers_1.apr
  • Sort Key: (((lead_offers_1.decision_code)::text = 'accepted'::text)) DESC, lead_offers_1.apr
28. 0.000 0.000 ↓ 0.0

Index Scan using lead_offers__customer_source_id on cnu.lead_offers lead_offers_1 (cost=0.42..3.44 rows=1 width=11) (actual rows= loops=)

  • Output: lead_offers_1.id, ((lead_offers_1.decision_code)::text = 'accepted'::text), lead_offers_1.apr
  • Index Cond: (lead_offers_1.customer_source_id = cs.id)
29. 0.000 0.000 ↓ 0.0

Index Scan using approvals_pkey on cnu.approvals ap (cost=4.18..7.06 rows=1 width=25) (actual rows= loops=)

  • Output: ap.id, ap.lock_version, ap.created_by, ap.updated_by, ap.created_on, ap.updated_on, ap.customer_id, ap.processed_on, ap.existing_flg, ap.credit_score_coef, ap.default_rate_coef, ap.profitability_rate_coef, ap.cap_and_risk_rules, ap.model_version, ap.teletrack_report_id, ap.clverify_report_id, ap.bank_balance, ap.approval_override, ap.status_cd, ap.reason_cd, ap.amount, ap.var_values, ap.state_limit, ap.cap_limit, ap.risk_limit, ap.auto_action_cd, ap.auto_reason_cd, ap.auto_action_hash, ap.veritrac_response_code, ap.veritec_report_id, ap.model_amount, ap.oneloan_report_id, ap.country_cd, ap.callml_report_id, ap.callicp_report_id, ap.callcredit_report_id, ap.bank_wizard_absolute_report_id, ap.credit_score_state_coef, ap.call_validate_report_id, ap.veda_credit_client_report_id, ap.veda_vericheck_aml_report_id, ap.transunion_client_report_id, ap.equifax_consumer_client_report_id, ap.eidcompare_report_id, ap.default_rate, ap.credit_score, ap.profitability_rate, ap.loan_amount_result_id, ap.datax_report_id, ap.arbitrary_rule_result_id, ap.credit_model_result_id, ap.long_term_result_id, ap.clearbank_report_id, ap.clearidfraud_report_id, ap.clearidattributes_report_id, ap.clearinquiry_report_id, ap.gverify_report_id, ap.pre_contract_fraud_report_id, ap.flex_id_report_id, ap.risk_view_report_id, ap.responsible_lending_amount_result_id, ap.experian_iq_iat_report_id, ap.experian_iq_saa_report_id, ap.experian_iq_rtq_report_id, ap.cpa_detective_report_id, ap.callcredit_callreport_id, ap.callcredit_tac_report_id, ap.targus_report_home_phone_id, ap.targus_report_work_phone_id, ap.subprime_id_fraud_report_id, ap.experian_delphi_report_id, ap.idscore_report_id, ap.fraud_attributes_report_id, ap.generated_for_product_id, ap.not_paid_on_time_result_id, ap.ons_validation_result_id, ap.customers_extra_history_change_sequence, ap.clear_bank_behavior_report_id, ap.call_validate_bankcheck_report_id, ap.call_validate_idcheck_report_id, ap.ea_report_id, ap.clear_fraud_report_id, ap.pre_approved_flg, ap.pre_approval_id, ap.transunion_report_id, ap.relending_flg, ap.default_score_adj, ap.refinance_flg, ap.last_changed_at, ap.concurrent_loan_report_id, ap.whitepages_report_id
  • Index Cond: (ap.id = (SubPlan 3))
30.          

SubPlan (forIndex Scan)

31. 0.000 0.000 ↓ 0.0

Limit (cost=3.61..3.61 rows=1 width=8) (actual rows= loops=)

  • Output: approvals.id, ((approvals.existing_flg)::integer)
32. 0.000 0.000 ↓ 0.0

Sort (cost=3.61..3.61 rows=1 width=8) (actual rows= loops=)

  • Output: approvals.id, ((approvals.existing_flg)::integer)
  • Sort Key: ((approvals.existing_flg)::integer), approvals.id DESC
33. 0.000 0.000 ↓ 0.0

Index Scan using approvals__customer_id_processed_on_id on cnu.approvals (cost=0.57..3.60 rows=1 width=8) (actual rows= loops=)

  • Output: approvals.id, (approvals.existing_flg)::integer
  • Index Cond: ((approvals.customer_id = cs.customer_id) AND (approvals.processed_on >= (cs.received_time - '3 days'::interval)) AND (approvals.processed_on <= (cs.received_time + '1 day'::interval)))
34. 0.000 0.000 ↓ 0.0

Index Scan using loans_pkey on cnu.loans l (cost=45.01..47.76 rows=1 width=18) (actual rows= loops=)

  • Output: l.id, l.lock_version, l.created_by, l.updated_by, l.created_on, l.updated_on, l.base_loan_id, l.customer_id, l.funding_date, l.funding_date_actual, l.due_date, l.due_date_adjusted, l.amount, l.fee_amount, l.status_cd, l.status_onhold_cd, l.coupon_code, l.coupon_discount_amount, l.end_action_cd, l.end_partial_payment_amount, l.comment, l.comment_hidden, l.requested_time, l.hidden_flg, l.approved_time, l.payment_method_cd, l.gov_law_state_cd, l.payoff_by_ach_flg, l.loan_type_cd, l.cso_lender_cd, l.pay_stub_id, l.cso_interest_rate, l.currency_cd, l.country_cd, l.auto_extended_flg, l.run_callcredit_flg, l.payment_flg, l.grace_period_status_id, l.interest_rate, l.bank_authorization_revoked_on, l.brand_id, l.paid_off_date, l.loan_rule_set_id, l.rules_file_id, l.off_pads, l.paid_off, l.approval_id, l.arrangement_version_id, l.funded_payment_instrument_id, l.status_reason, l.loan_source_id, l.external_identifier, l.on_demand_date, l.due_date_adjusted_calculated, l.customer_source_id, l.customer_source_link_type_id, l.funding_method_cd, l.refinanced_into_id, l.application_id, l.legal_entity_id, l.last_changed_at, l.accounting_mode_id
  • Index Cond: (l.id = (SubPlan 4))
35.          

SubPlan (forIndex Scan)

36. 0.000 0.000 ↓ 0.0

Limit (cost=44.44..44.45 rows=1 width=8) (actual rows= loops=)

  • Output: loans.id, ((CASE WHEN ((loans.status_cd)::text = ANY ('{issued,issued_pmt_proc,in_default,in_default_pmt_proc,paid_off,charge_off,sold}'::text[])) THEN true WHEN ((loans.status_cd)::text = ANY ('{approved,on_hold,applied,withdrawn,declined}'::text[])) THEN false ELSE NULL::boolean END)::integer)
37. 0.000 0.000 ↓ 0.0

Sort (cost=44.44..44.45 rows=1 width=8) (actual rows= loops=)

  • Output: loans.id, ((CASE WHEN ((loans.status_cd)::text = ANY ('{issued,issued_pmt_proc,in_default,in_default_pmt_proc,paid_off,charge_off,sold}'::text[])) THEN true WHEN ((loans.status_cd)::text = ANY ('{approved,on_hold,applied,withdrawn,declined}'::text[])) THEN false ELSE NULL::boolean END)::integer)
  • Sort Key: ((CASE WHEN ((loans.status_cd)::text = ANY ('{issued,issued_pmt_proc,in_default,in_default_pmt_proc,paid_off,charge_off,sold}'::text[])) THEN true WHEN ((loans.status_cd)::text = ANY ('{approved,on_hold,applied,withdrawn,declined}'::text[])) THEN false ELSE NULL::boolean END)::integer) DESC, loans.id DESC
38. 0.000 0.000 ↓ 0.0

Index Scan using loans_m12 on cnu.loans (cost=0.44..44.43 rows=1 width=8) (actual rows= loops=)

  • Output: loans.id, (CASE WHEN ((loans.status_cd)::text = ANY ('{issued,issued_pmt_proc,in_default,in_default_pmt_proc,paid_off,charge_off,sold}'::text[])) THEN true WHEN ((loans.status_cd)::text = ANY ('{approved,on_hold,applied,withdrawn,declined}'::text[])) THEN false ELSE NULL::boolean END)::integer
  • Index Cond: (loans.customer_id = cs.customer_id)
  • Filter: ((loans.requested_time >= (cs.received_time - '01:00:00'::interval)) AND (loans.requested_time <= (cs.received_time + '6 days'::interval)))
39. 0.000 0.000 ↓ 0.0

Index Only Scan using loans_pkey on cnu.loans l2 (cost=9.85..11.57 rows=1 width=4) (actual rows= loops=)

  • Output: l2.id
  • Index Cond: (l2.id = (SubPlan 5))
40.          

SubPlan (forIndex Only Scan)

41. 0.000 0.000 ↓ 0.0

Limit (cost=0.44..9.29 rows=1 width=4) (actual rows= loops=)

  • Output: loans_1.id
42. 0.000 0.000 ↓ 0.0

Index Scan using loans_m12 on cnu.loans loans_1 (cost=0.44..44.70 rows=5 width=4) (actual rows= loops=)

  • Output: loans_1.id
  • Index Cond: (loans_1.customer_id = cs.customer_id)
  • Filter: ((loans_1.requested_time < (cs.received_time - '01:00:00'::interval)) AND CASE WHEN ((loans_1.status_cd)::text = ANY ('{issued,issued_pmt_proc,in_default,in_default_pmt_proc,paid_off,charge_off,sold}'::text[])) THEN true WHEN ((loans_1.status_cd)::text = ANY ('{approved,on_hold,applied,withdrawn,declined}'::text[])) THEN false ELSE NULL::boolean END)
43. 0.000 0.000 ↓ 0.0

Limit (cost=4.54..4.54 rows=1 width=9) (actual rows= loops=)

  • Output: ce.changed_on, ce.upswing_flg
44. 0.000 0.000 ↓ 0.0

Sort (cost=4.54..4.54 rows=1 width=9) (actual rows= loops=)

  • Output: ce.changed_on, ce.upswing_flg
  • Sort Key: ce.changed_on DESC
45. 0.000 0.000 ↓ 0.0

Index Scan using customers_extra_history__pk_customer_id__change_sequence on cnu.customers_extra_history ce (cost=0.44..4.53 rows=1 width=9) (actual rows= loops=)

  • Output: ce.changed_on, ce.upswing_flg
  • Index Cond: (ce.customer_id = cs.customer_id)
  • Filter: (ce.changed_on < (cs.received_time + '01:00:00'::interval))
46.          

SubPlan (forWindowAgg)

47. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.44..3.45 rows=1 width=8) (actual rows= loops=)

  • Output: count(*)
48. 0.000 0.000 ↓ 0.0

Index Scan using lead_offers__customer_source_id on cnu.lead_offers (cost=0.42..3.44 rows=1 width=0) (actual rows= loops=)

  • Output: lead_offers.id, lead_offers.customer_source_id, lead_offers.created_by, lead_offers.created_on, lead_offers.decision_code, lead_offers.decision_reason, lead_offers.term, lead_offers.term_unit, lead_offers.term_payment, lead_offers.loan_amount, lead_offers.apr, lead_offers.total_repayment_amount, lead_offers.finance_charge, lead_offers.loan_type_cd, lead_offers.last_changed_at, lead_offers.interest_rate, lead_offers.approval_id, lead_offers.product_cd
  • Index Cond: (lead_offers.customer_source_id = cs.id)
  • Filter: ((lead_offers.decision_code)::text = 'accepted'::text)