Author: Rohit Umarjikar
Posted: Tue Sep 13, 2016 8:40 pm (GMT 5.5)
That is still very high, So I am sure something is not good either with the logic in the query or indexes are not proper being used and somewhere, it may be doing a TS scan. Would you like to mask and share the query to us ? As then someone can suggest you a better tuned query, if its in scope, also try doing reorg as well before runstats.
Unless the subprogram performs faster as expected to be , there is no point spending time on this and finding answer.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."![icon_razz.gif]()
Posted: Tue Sep 13, 2016 8:40 pm (GMT 5.5)
Quote: |
I made the change and moved the SQLs within one of the SP to the program. I then, did a runstats and rebind and it proved to be fruitful. I got a run rate of 7 CPU minutes for 200000 records. |
Quote: |
But the questions still remain unanswered. Why does the stored proc has poor performance in batch compared to embedded SQLs? |
Unless the subprogram performs faster as expected to be , there is no point spending time on this and finding answer.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
