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
精彩评论