Suggestion
Ghassan, June 11, 2016 - 6:59 am UTC
Make the function deterministic
Use the result cache hint and a parallel hint if possible in the select stmt.
Create table as select ..fct (),..,fct ()
Otherwise Merge stmt could be a solution with the rowid hint for target also by using parallelism
Also if partitioned table try prunning and splitting by sets. ..
logic inside this function PKG.MASKFUNC
Rajeshwaran, Jeyabal, June 11, 2016 - 2:41 pm UTC
What sort of logic you have inside this function "PKG.MASKFUNC" ?
is that something a simple sql sitting inside that function, that inturn do look-up on Dimension Tables?
A reader, June 16, 2016 - 4:45 pm UTC
Explored dbms_parallel_execute along with result cache on mask function. Observed latch free wait events with latching on result cache. However, I figured out from the data that out of nine columns I mentioned in previous post, only one column needs to be masked and rest can be derived from this one column. As a result, I will be running mask function only once per row against previous logic of running it nine times per row. Was able to finish masking on 86 million rows in 85 mins.
Thanks for your inputs.
June 17, 2016 - 2:46 am UTC
Glad it worked out well