slow performance for this sql
insert into ar_aged_debt_trans SELECT ar_unpaid.dtype_r, ar_unpaid.dref, :"SYS_B_0", ar_unpaid.debtornum, ar_unpaid.amt_unpaid,
:"SYS_B_1", ar_unpaid.date_due, ar_transaction.date_posted, ar_transaction.amount, en_company.company_code,
:"SYS_B_2", ar_unpaid.debit_class, null, :p1 , :p2 , null, null
from ar_unpaid ,ar_transaction ,ar_debtor ,pm_branch ,pm_division ,en_company
where ar_unpaid.dtype_r = ar_transaction.type_r