Загрузка данных


Nested Loop  (cost=4095109.16..4308542.77 rows=16818 width=327)
  Output: i.insurance_number, s.number, a_1.death_date, (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{ОПС,"ОПС ГВ","ОПС КП","Р ПП ОПС"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{"ОПС ИД","ОПС ФР","Р ПП ОПС ИД"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{"ДПС Л","ДПС Л ГВ","ДПС Л КП","Р ПП ДПС Л"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{"ДПС Л ИД","ДПС Л ФР","Р ПП ДПС Л ИД"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{"ДПС Г","ДПС Г ГВ","ДПС Г КП","Р ПП ДПС Г"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{"ДПС Г ИД","ДПС Г ФР","Р ПП ДПС Г ИД"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{"ДПС МК","ДПС МК ГВ","ДПС МК КП","Р ПП ДПС МК"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(CASE WHEN ((at.mnemonics)::text = ANY ('{"ДПС МК ИД","ДПС МК ФР","Р ПП ДПС МК ИД"}'::text[])) THEN m.signed_value ELSE '0'::numeric END)), (sum(m.signed_value)), s.id
  CTE latest_death_info
    ->  Result  (cost=0.42..57790.33 rows=634009 width=16)
          Output: a_2.individual_id, a_2.death_date, a_2.version
          ->  Unique  (cost=0.42..57790.33 rows=634009 width=16)
                Output: a_2.id, a_2.number, a_2.date, a_2.death_date, a_2.death_info_date, a_2.death_certificate_date, a_2.death_certificate_number, a_2.death_info_certificate_code, a_2.comment, a_2.accepted, a_2.rejected, a_2.canceled, a_2.version, a_2.agent_id, a_2.individual_id, a_2.individual_document_id, a_2.death_certificate_place, a_2.person_death_registration_id, a_2.person_id, a_2.death_info_received_type_code, a_2.ops_transfer_register_id, a_2.source_document_info, a_2.is_svo, a_2.previous_death_info_id, a_2.is_not_death_date, a_2.death_date_month, a_2.death_date_year, a_2.transfered_balance_to_sr
                ->  Index Scan using adi_last_by_individual_idx on ourpension.application_death_info a_2  (cost=0.42..55594.82 rows=878205 width=16)
                      Output: a_2.id, a_2.number, a_2.date, a_2.death_date, a_2.death_info_date, a_2.death_certificate_date, a_2.death_certificate_number, a_2.death_info_certificate_code, a_2.comment, a_2.accepted, a_2.rejected, a_2.canceled, a_2.version, a_2.agent_id, a_2.individual_id, a_2.individual_document_id, a_2.death_certificate_place, a_2.person_death_registration_id, a_2.person_id, a_2.death_info_received_type_code, a_2.ops_transfer_register_id, a_2.source_document_info, a_2.is_svo, a_2.previous_death_info_id, a_2.is_not_death_date, a_2.death_date_month, a_2.death_date_year, a_2.transfered_balance_to_sr
  CTE ops_sharer
    ->  Nested Loop Anti Join  (cost=5.40..1756629.79 rows=121510 width=8)
          Output: s_2.id, death_info.death_date
          Join Filter: (o.effective_date <= p.report_date)
          InitPlan 2
            ->  Result  (cost=0.00..0.01 rows=1 width=1)
                  Output: (NULLIF(current_setting('app.user_id'::text, true), ''::text) IS NULL)
          InitPlan 4
            ->  Result  (cost=1.02..1.03 rows=1 width=1)
                  Output: (InitPlan 3).col1
                  InitPlan 3
                    ->  Seq Scan on ourpension.user_group ug  (cost=0.00..1.02 rows=1 width=0)
                          Filter: (ug.user_id = (NULLIF(current_setting('app.user_id'::text, true), ''::text))::bigint)
          ->  Nested Loop  (cost=2.93..923462.50 rows=131961 width=12)
                Output: death_info.death_date, p.report_date, s_2.id
                Inner Unique: true
                ->  Nested Loop  (cost=0.43..211876.92 rows=277417 width=16)
                      Output: death_info.death_date, p.report_date, s_2.id, s_2.contract_id
                      ->  Nested Loop  (cost=0.00..20606.30 rows=211336 width=12)
                            Output: death_info.death_date, death_info.individual_id, p.report_date
                            Join Filter: (death_info.death_date <= p.report_date)
                            ->  Seq Scan on report.dia_param p  (cost=0.00..1.01 rows=1 width=4)
                                  Output: p.report_date, p.unload_perconal_data, p."user", p.register_kind
                            ->  CTE Scan on latest_death_info death_info  (cost=0.00..12680.18 rows=634009 width=8)
                                  Output: death_info.individual_id, death_info.death_date
                      ->  Index Scan using sharer_individual_id_idx on ourpension.sharer s_2  (cost=0.43..0.90 rows=1 width=12)
                            Output: s_2.id, s_2.annulled, s_2.approved, s_2.created, s_2.init_order_date, s_2.init_order_number, s_2.version, s_2.annulled_agent_id, s_2.approved_agent_id, s_2.contract_id, s_2.created_agent_id, s_2.individual_id, s_2.sharer, s_2.bank_details_id, s_2.number, s_2.close_date, s_2.closed, s_2.closed_agent_id, s_2.closed_reason_id, s_2.pension_program_id, s_2.inheritance_type_code, s_2.investor_pension, s_2.first_payment_persent, s_2.retiree, s_2.service_length, s_2.dismiss_date, s_2.district_k, s_2.monthly_salary, s_2.periodicity_code, s_2.payout_duration, s_2.open_date, s_2.npo_pension_type_id, s_2.comment, s_2.sharer_id_1c, s_2.contract_id_1c, s_2.person_id, s_2.scheme_id, s_2.not_displayed_in_lkk, s_2.code_1c, s_2.entity_id, s_2.inheritance_on_accum, s_2.inheritance_on_pay
                            Index Cond: (s_2.individual_id = death_info.individual_id)
                ->  Index Scan using contract_pkey on ourpension.contract c  (cost=2.50..2.57 rows=1 width=4)
                      Output: c.id
                      Index Cond: (c.id = s_2.contract_id)
                      Filter: (((c.service_type)::text = 'OPS'::text) AND CASE WHEN (InitPlan 2).col1 THEN true WHEN (InitPlan 4).col1 THEN (ANY (c.id = (hashed SubPlan 5).col1)) ELSE (NOT (ANY (c.id = (hashed SubPlan 6).col1))) END)
                      SubPlan 5
                        ->  Nested Loop  (cost=0.00..1.03 rows=1 width=8)
                              Output: a_3.contract_id
                              Join Filter: (ug_1.group_id = a_3.group_id)
                              ->  Seq Scan on ourpension.user_group ug_1  (cost=0.00..1.02 rows=1 width=8)
                                    Output: ug_1.user_id, ug_1.group_id, ug_1.created_at
                                    Filter: (ug_1.user_id = (NULLIF(current_setting('app.user_id'::text, true), ''::text))::bigint)
                              ->  Seq Scan on ourpension.rbac_contract_access a_3  (cost=0.00..0.00 rows=1 width=16)
                                    Output: a_3.group_id, a_3.contract_id
                      SubPlan 6
                        ->  Nested Loop  (cost=0.00..1.02 rows=1 width=8)
                              Output: a_4.contract_id
                              Inner Unique: true
                              Join Filter: (a_4.group_id = g.id)
                              ->  Seq Scan on ourpension.rbac_contract_access a_4  (cost=0.00..0.00 rows=1 width=16)
                                    Output: a_4.group_id, a_4.contract_id
                              ->  Seq Scan on ourpension.individual_groups g  (cost=0.00..1.01 rows=1 width=4)
                                    Output: g.id
                                    Filter: g.hidden_from_external
          ->  Nested Loop  (cost=1.43..3.09 rows=291 width=8)
                Output: d.sharer_id, o.effective_date
                Inner Unique: true
                ->  Nested Loop  (cost=1.00..2.20 rows=2 width=16)
                      Output: d.ops_transfer_register_id, d.sharer_id, o.ops_transfer_register_id, o.effective_date
                      ->  Index Scan using ops_transfer_details_sharer_id on back_office.ops_transfer_details d  (cost=0.43..0.48 rows=2 width=8)
                            Output: d.ops_transfer_register_id, d.sharer_id, d.ops_fixing_id, d.new_insurer, d.previos_insurer, d.transfer_type, d.transfer_reason, d.pension_type, d.smev_uier_id, d.new_insurer_inn, d.balance, d.balance_sv, d.balance_dsv, d.balance_vr, d.balance_sofn, d.balance_msk, d.revenue, d.revenue_sv, d.revenue_dsv, d.revenue_vr, d.revenue_sofn, d.revenue_msk, d.transfer, d.transfer_sv, d.transfer_dsv, d.transfer_vr, d.transfer_sofn, d.transfer_msk, d.version, d.transfer_revenue_sv, d.transfer_revenue_dsv, d.transfer_revenue_vr, d.transfer_revenue_sofn, d.transfer_revenue_msk, d.transfer_revenue, d.fund_id, d.reserve, d.fund_bank_payment_type_id, d.entity_id
                            Index Cond: (d.sharer_id = s_2.id)
                      ->  Index Scan using idx_operation_transfer_register_id on back_office.operation o  (cost=0.57..0.85 rows=1 width=8)
                            Output: o.id, o.operation_type_id, o.author_agent_id, o.approver_agent_id, o.remover_agent_id, o.operation_date, o.effective_date, o.created, o.approved, o.deleted, o.query_datasource_file_id, o.version, o.period_date, o.comment, o.ops_payment_decision_id, o.payment_order_register_id, o.investment_revenue_calculation_id, o.pension_calculation_id, o.inheritance_calculation_id, o.termination_contract_calculation_id, o.payment_register_id, o.payment_return_id, o.inherited_payment_id, o.ops_assignee_decision_id, o.ops_payment_register_id, o.ops_fixing_id, o.ops_transfer_register_id, o.ops_payment_return_id, o.operation_document_id, o.revoked, o.revoker_agent_id, o.compensation_calculation_id, o.resumption_id, o.overpayment_return_id, o.inheritance_pension_calculation_id, o.ops_court_decision_id, o.ops_income_payment_order_id_1c, o.ops_deposit_enrollment_operation_id_1c, o.ops_transfer_to_reserve_id_1c, o.ops_payment_decision_id_1c, o.ops_transfer_to_assignee_reserve_id_1c, o.ops_investment_revenue_enrollment_id_1c, o.pension_charge_from_reserve_id_1c, o.ops_assignee_decision_id_1c, o.assignee_charge_from_reserve_id_1c, o.ops_transfer_operation_id_1c, o.ops_transfer_register_id_1c, o.ops_payment_register_hash_id_1c, o.ops_payment_register_operation_id_1c, o.ops_payment_return_hash_id_1c, o.ops_payment_return_operation_id_1c, o.ops_transfer_from_rops_operation_hash_id_1c, o.ops_correction_pfr_operation_hash_id_1c, o.ops_transfers_between_accounts_operation_hash_id_1c, o.ops_transfers_to_fund_reserve_pair_operation_hash_id_1c, o.ops_transfers_to_fund_reserve_single_operation_hash_id_1c, o.ops_misgrading_adjustment_operation_hash_id_1c, o.ops_manual_temporary_operation_hash_id_1c, o.ops_pension_savings_enrollment_operation_hash_id_1c, o.ops_income_from_own_funds_operation_hash_id_1c, o.ops_compensation_from_own_funds_operation_hash_id_1c, o.ops_commission_np_from_fund_reserve_operation_hash_id_1c, o.ops_return_from_fund_reserve_operation_id, o.ops_termination_pension_payments_operation_hash_id_1c, o.id_1c, o."incoming_order_id_1с", o.pension_calculation_id_1c, o.termination_contract_calculation_id_1c, o."inheritance_calculation_id_1с", o.payment_order_number, o.date_order_number, o.payment_return_id_1c, o.death_info_id, o.ops_transfer_pds_operation_hash_id_1c, o.npo_fixing_id, o.insurance_reserve_register_id, o.pds_payment_decision_id, o.accrual_repurchase_payments_inheritors_details_id, o.accrual_repurchase_amount_payments_details_id, o.pds_assignee_decision_id, o.ops_recovery_enrollment_operation_hash_id_1c
                            Index Cond: (o.ops_transfer_register_id = d.ops_transfer_register_id)
                            Filter: (o.approved IS NOT NULL)
                ->  Index Only Scan using ops_transfer_register_pk on back_office.ops_transfer_register tr  (cost=0.42..0.45 rows=1 width=4)
                      Output: tr.id
                      Index Cond: (tr.id = d.ops_transfer_register_id)
  CTE reserve_accounts
    ->  Aggregate  (cost=295960.56..295960.57 rows=1 width=32)
          Output: array_agg(a_5.id)
          ->  Nested Loop  (cost=0.71..295469.80 rows=196302 width=4)
                Output: a_5.id
                ->  Index Only Scan using account_type_mnemonics_idx1 on back_office.account_type at_1  (cost=0.27..4.94 rows=2 width=4)
                      Output: at_1.mnemonics, at_1.id
                      Index Cond: (at_1.mnemonics = ANY ('{"Р ОПС","Р ОПС ИД"}'::text[]))
                ->  Index Scan using idx_account_account_type_id on back_office.account a_5  (cost=0.44..143971.28 rows=376115 width=8)
                      Output: a_5.id, a_5.operation_id, a_5.account_type_id, a_5.owner_contract_id, a_5.owner_sharer_id, a_5.owner_individual_id, a_5.owner_entity_id, a_5.version
                      Index Cond: (a_5.account_type_id = at_1.id)
  CTE reserve_movements
    ->  Append  (cost=0.42..336495.35 rows=50834590 width=23)
          ->  Nested Loop  (cost=0.42..7687.52 rows=25417295 width=10)
                Output: t.debit_account_id, t.value
                ->  CTE Scan on reserve_accounts r  (cost=0.00..0.02 rows=1 width=32)
                      Output: r.ids
                ->  Append  (cost=0.42..7635.87 rows=5163 width=14)
                      ->  Index Scan using transaction_2000_credit_account_id_effective_date_value_idx on back_office.transaction_2000 t_1  (cost=0.42..53.00 rows=56 width=14)
                            Output: t_1.debit_account_id, t_1.value, t_1.credit_account_id
                            Index Cond: (t_1.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2001_credit_account_id_effective_date_value_idx on back_office.transaction_2001 t_2  (cost=0.42..56.02 rows=39 width=14)
                            Output: t_2.debit_account_id, t_2.value, t_2.credit_account_id
                            Index Cond: (t_2.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2002_credit_account_id_effective_date_value_idx on back_office.transaction_2002 t_3  (cost=0.42..65.75 rows=46 width=14)
                            Output: t_3.debit_account_id, t_3.value, t_3.credit_account_id
                            Index Cond: (t_3.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2003_credit_account_id_effective_date_value_idx on back_office.transaction_2003 t_4  (cost=0.42..32.61 rows=26 width=14)
                            Output: t_4.debit_account_id, t_4.value, t_4.credit_account_id
                            Index Cond: (t_4.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2004_credit_account_id_effective_date_value_idx on back_office.transaction_2004 t_5  (cost=0.42..36.13 rows=30 width=14)
                            Output: t_5.debit_account_id, t_5.value, t_5.credit_account_id
                            Index Cond: (t_5.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2005_credit_account_id_effective_date_value_idx on back_office.transaction_2005 t_6  (cost=0.43..89.16 rows=85 width=13)
                            Output: t_6.debit_account_id, t_6.value, t_6.credit_account_id
                            Index Cond: (t_6.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2006_credit_account_id_effective_date_value_idx on back_office.transaction_2006 t_7  (cost=0.43..83.43 rows=88 width=14)
                            Output: t_7.debit_account_id, t_7.value, t_7.credit_account_id
                            Index Cond: (t_7.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2007_credit_account_id_effective_date_value_idx on back_office.transaction_2007 t_8  (cost=0.43..104.68 rows=110 width=13)
                            Output: t_8.debit_account_id, t_8.value, t_8.credit_account_id
                            Index Cond: (t_8.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2008_credit_account_id_effective_date_value_idx on back_office.transaction_2008 t_9  (cost=0.43..145.62 rows=143 width=14)
                            Output: t_9.debit_account_id, t_9.value, t_9.credit_account_id
                            Index Cond: (t_9.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2009_credit_account_id_effective_date_value_idx on back_office.transaction_2009 t_10  (cost=0.43..110.61 rows=126 width=14)
                            Output: t_10.debit_account_id, t_10.value, t_10.credit_account_id
                            Index Cond: (t_10.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2010_credit_account_id_effective_date_value_idx on back_office.transaction_2010 t_11  (cost=0.43..131.60 rows=151 width=14)
                            Output: t_11.debit_account_id, t_11.value, t_11.credit_account_id
                            Index Cond: (t_11.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_01_credit_account_id_effective_date_value_idx on back_office.transaction_2011_01 t_12  (cost=0.42..35.15 rows=20 width=14)
                            Output: t_12.debit_account_id, t_12.value, t_12.credit_account_id
                            Index Cond: (t_12.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_02_credit_account_id_effective_date_value_idx on back_office.transaction_2011_02 t_13  (cost=0.42..37.80 rows=21 width=14)
                            Output: t_13.debit_account_id, t_13.value, t_13.credit_account_id
                            Index Cond: (t_13.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_03_credit_account_id_effective_date_value_idx on back_office.transaction_2011_03 t_14  (cost=0.43..33.04 rows=24 width=14)
                            Output: t_14.debit_account_id, t_14.value, t_14.credit_account_id
                            Index Cond: (t_14.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_04_credit_account_id_effective_date_value_idx on back_office.transaction_2011_04 t_15  (cost=0.42..37.53 rows=22 width=14)
                            Output: t_15.debit_account_id, t_15.value, t_15.credit_account_id
                            Index Cond: (t_15.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_05_credit_account_id_effective_date_value_idx on back_office.transaction_2011_05 t_16  (cost=0.43..28.05 rows=14 width=13)
                            Output: t_16.debit_account_id, t_16.value, t_16.credit_account_id
                            Index Cond: (t_16.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_06_credit_account_id_effective_date_value_idx on back_office.transaction_2011_06 t_17  (cost=0.42..38.89 rows=22 width=14)
                            Output: t_17.debit_account_id, t_17.value, t_17.credit_account_id
                            Index Cond: (t_17.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_07_credit_account_id_effective_date_value_idx on back_office.transaction_2011_07 t_18  (cost=0.42..38.83 rows=22 width=13)
                            Output: t_18.debit_account_id, t_18.value, t_18.credit_account_id
                            Index Cond: (t_18.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_08_credit_account_id_effective_date_value_idx on back_office.transaction_2011_08 t_19  (cost=0.42..39.43 rows=22 width=14)
                            Output: t_19.debit_account_id, t_19.value, t_19.credit_account_id
                            Index Cond: (t_19.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_09_credit_account_id_effective_date_value_idx on back_office.transaction_2011_09 t_20  (cost=0.43..27.21 rows=14 width=13)
                            Output: t_20.debit_account_id, t_20.value, t_20.credit_account_id
                            Index Cond: (t_20.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_10_credit_account_id_effective_date_value_idx on back_office.transaction_2011_10 t_21  (cost=0.42..37.86 rows=21 width=14)
                            Output: t_21.debit_account_id, t_21.value, t_21.credit_account_id
                            Index Cond: (t_21.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_11_credit_account_id_effective_date_value_idx on back_office.transaction_2011_11 t_22  (cost=0.43..27.55 rows=14 width=13)
                            Output: t_22.debit_account_id, t_22.value, t_22.credit_account_id
                            Index Cond: (t_22.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2011_12_credit_account_id_effective_date_value_idx on back_office.transaction_2011_12 t_23  (cost=0.43..27.28 rows=13 width=14)
                            Output: t_23.debit_account_id, t_23.value, t_23.credit_account_id
                            Index Cond: (t_23.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_01_credit_account_id_effective_date_value_idx on back_office.transaction_2012_01 t_24  (cost=0.42..36.53 rows=21 width=14)
                            Output: t_24.debit_account_id, t_24.value, t_24.credit_account_id
                            Index Cond: (t_24.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_02_credit_account_id_effective_date_value_idx on back_office.transaction_2012_02 t_25  (cost=0.42..40.10 rows=23 width=14)
                            Output: t_25.debit_account_id, t_25.value, t_25.credit_account_id
                            Index Cond: (t_25.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_03_credit_account_id_effective_date_value_idx on back_office.transaction_2012_03 t_26  (cost=0.43..48.66 rows=34 width=13)
                            Output: t_26.debit_account_id, t_26.value, t_26.credit_account_id
                            Index Cond: (t_26.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_04_credit_account_id_effective_date_value_idx on back_office.transaction_2012_04 t_27  (cost=0.42..36.72 rows=22 width=14)
                            Output: t_27.debit_account_id, t_27.value, t_27.credit_account_id
                            Index Cond: (t_27.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_05_credit_account_id_effective_date_value_idx on back_office.transaction_2012_05 t_28  (cost=0.42..36.98 rows=20 width=14)
                            Output: t_28.debit_account_id, t_28.value, t_28.credit_account_id
                            Index Cond: (t_28.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_06_credit_account_id_effective_date_value_idx on back_office.transaction_2012_06 t_29  (cost=0.43..27.07 rows=13 width=13)
                            Output: t_29.debit_account_id, t_29.value, t_29.credit_account_id
                            Index Cond: (t_29.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_07_credit_account_id_effective_date_value_idx on back_office.transaction_2012_07 t_30  (cost=0.42..38.66 rows=22 width=13)
                            Output: t_30.debit_account_id, t_30.value, t_30.credit_account_id
                            Index Cond: (t_30.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_08_credit_account_id_effective_date_value_idx on back_office.transaction_2012_08 t_31  (cost=0.43..29.20 rows=17 width=14)
                            Output: t_31.debit_account_id, t_31.value, t_31.credit_account_id
                            Index Cond: (t_31.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_09_credit_account_id_effective_date_value_idx on back_office.transaction_2012_09 t_32  (cost=0.43..26.22 rows=13 width=13)
                            Output: t_32.debit_account_id, t_32.value, t_32.credit_account_id
                            Index Cond: (t_32.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_10_credit_account_id_effective_date_value_idx on back_office.transaction_2012_10 t_33  (cost=0.43..28.84 rows=17 width=14)
                            Output: t_33.debit_account_id, t_33.value, t_33.credit_account_id
                            Index Cond: (t_33.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_11_credit_account_id_effective_date_value_idx on back_office.transaction_2012_11 t_34  (cost=0.42..36.74 rows=21 width=14)
                            Output: t_34.debit_account_id, t_34.value, t_34.credit_account_id
                            Index Cond: (t_34.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2012_12_credit_account_id_effective_date_value_idx on back_office.transaction_2012_12 t_35  (cost=0.43..33.34 rows=17 width=14)
                            Output: t_35.debit_account_id, t_35.value, t_35.credit_account_id
                            Index Cond: (t_35.credit_account_id = ANY (r.ids))
                      ->  Index Scan using transaction_2013_01_credit_account_id_effective_date_value_idx on back_office.transaction_2013_01 t_36  (cost=0.42..35.10 rows=21 width=14)
                            Output: t_36.debit_account_id, t_36.value, t_36.credit_account_id