|
|
|
Re: Tune a cursor [message #574668 is a reply to message #574641] |
Mon, 14 January 2013 14:46 |
|
cherryreddi wrote on Tue, 15 January 2013 01:19Below is an interview question. Can someone answer this?
If a loop in a cursor is taking long time to execute.. How will you tune it???
I think it's incomplete question, because it depends on where most time spends.
Therefore, you first need to know where the bottleneck is.
If it is on fetch and context switching than you need to use "bulk fetch" with suitable limit. btw, cursor loop already would use bulk fetch on 10g and above if cursor is implicit.
If it is on pl/sql inside a loop, then you can use parallelizing.
If it is on sql, you need to tune execution plan.
PS. I'm not sure that you mean a cursor loop and not nested loops in a execution plan
|
|
|