oracle job问多线程问题
奖况:
我现在有一个表A,系统前台不断的添加记录。现在要做一个job处理表A的记录。我使用的是
cursor is select * from (
select A.* from sms_timing_send A where A.SEND_TIME>=sysdate and STATUS=1 ) where rownum<40 for update NOWAIT;
open cur_tsend;
for idx in cur_tsend loop
end loop;
close cur_tsend;
commit;
exception
when others then
用存储过程来处理表A的记录,存储过程尚未测试,编译没问题,到底逻辑对不对呢?
我的要求是:
1、可能多job同时运行
2、每次根据时间优先每次处理40条记录,要求不出现死锁情况,请大家给我提解决方案,
谢谢了!