1 person found this helpful
Could you please share with the database version you are using?
Do an Explain plan and check if the UPDATE sql use the indexes (if any). Kindly share how many number of records are getting updated as part of this SQL query?
You can try using EXECUTE IMMEDIATE using clause rather hard coding your SQL statements.
Hi Thanks for the help,
Here are the answers.
Oracle Version 10g
Yes there are 10 indexes the number of records that are to be updated is 7000 but the spl has more then 3million records.
I will try with the option you mentioned.
this will not going to scale, you are doing slow by slow processing try to do it in a single SQL statement as far as possible.
something like below.
merge into spl trg
select distinct oid, po.INTRO_DATE as dt
from spl x, seas y, sku z, R_INTRO_DATE r
where y.master=x.a3b5 and z.master=x.skuid and r.po.band='26'
and y.att18=r.season and z.att23=r.article_num
when matched then update set trg.date2=src.dt