Cursor performance

Cursor performance

 

  

Hi Folks,

Could you guys recommend some quick tips for improving performance of static cursors in db2...

declare cur1 cursor with hold for
select ta1, rownumber() over ( order by ta1 )
from tabA where ta1 in (select distinct (tb1) from tabB where tb2 in (8,6,3)
and tb3 <= :timestamp1
and tb4 in (select tc1 from tabC where tc2 = :timestamp1
and tc3 <= :timestamp1)
and tb5 in (select td1 from tabD where td2 = :num2)
and ta1 > :num1)

TabA and tabB each have 10 Mill rows each.....

ta1 and tb1 are indexed......


Basically, the open of cursor when run in 10 concurrent agents,takes a lot of time

Thanks in advance





DISCLAIMER:
This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

DB2 & UDB email list listserv db2-l LazyDBA home page