开发者

oracle query timeout

simple query causes ora - 01013 error

select count (*) as counter, 'month_stat' as name
from s_contact_x
where created < last_upd
and (sysdate - last_upd) < 1

Message: Query failed ORA-01013: user requested cancel of current operation

This select q开发者_如何学Pythonuery is succesfully running in TOAD editor, but it takes 3-5 min get resultset.

As I understood, this problem corresponding with oracle query timeout, how we can set it in query?


As others have suggested, you should first look at changing settings and adding indexes. If that doesn't work then you may want to look into using parallelism to speed up the query:

select /*+ parallel(s_contact_x) */ count (*) as counter, 'month_stat' as name
from s_contact_x
where created < last_upd
and (sysdate - last_upd) < 1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜