Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to loop table every 1 second for no more than 4 seconds
Jun wrote:
> Thanks for all of your help.
> Let me get more specifid.
>
> I am working on Oracle 9i
> I am supposed to write a PL/SQL strored procedure to create a new
> record with 'status' field in one table.
> and some existing trigger will check the new record and set the value
> of 'status'
>
> my task after record creation is to loop the table every 1 second for
> no more than 4 seconds to
> check if the status field has been changed to the value 'completed.
> if yes, return a successful message
> if no, set the value of status to timeout and return a timeout error.
>
>
> thanks again for all your help
That sounds really expensive. Maybe you could you do one of the following:
> and some existing trigger will check the new record and set the value
> of 'status'
2) Have the session that inserted the row do whatever is necessary to update the status to completed? If it really is a trigger on the table you are inserting, you can also access the value of the status column during the insert...
If I am understanding you correctly, it just sounds like you are doing a lot of I/O to do what you want.
HTH, Steve Received on Mon Nov 27 2006 - 11:52:41 CST