بتاريخ: 28 أكتوبر 200916 سنة comment_174684 I tried this quer caused problem:- /* DELETE ln_bill WHERE ROWID IN (SELECT ln_bill.ROWID FROM ln_bill a, ln_pmt_schedule b WHERE a.acct_type = sAcctType AND a.acct_no = sAcctNo AND a.status IN ('Unsatisfied', 'Deferred', 'Skipped') AND a.TYPE_ NOT IN ('Loan Fees', 'Late Fees') AND a.acct_no = b.acct_no AND a.acct_type = b.acct_type AND a.pmt_sched_id_no = b.pmt_sched_id_no AND b.status = 'Closed');*/Then tried this one although added index at PTID other also caused a problem:- DELETE LN_BILL WHERE PTID IN (SELECT LN_BILL.PTID FROM LN_BILL a, LN_PMT_SCHEDULE b WHERE a.acct_type = sAcctType AND a.acct_no = sAcctNo AND a.status IN ('Unsatisfied', 'Deferred', 'Skipped') AND a.TYPE_ NOT IN ('Loan Fees', 'Late Fees') AND a.acct_no = b.acct_no AND a.acct_type = b.acct_type AND a.pmt_sched_id_no = b.pmt_sched_id_no AND b.status = 'Closed'); تقديم بلاغ
بتاريخ: 28 أكتوبر 200916 سنة comment_174686 U said that the query caused a problem and u forget to mention it as i understand from the title the query is too slow so try to use the = in he where cond. rather than the in expression the scond advice is to create an ndx on every field in the where cond. ( if not exists) thanks تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.