Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to loop table every 1 second for no more than 4 seconds

Re: how to loop table every 1 second for no more than 4 seconds

From: Steve Howard <stevedhoward_at_gmail.com>
Date: 27 Nov 2006 09:52:41 -0800
Message-ID: <1164643246.019707.76660@h54g2000cwb.googlegroups.com>

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:

  1. Have a monitoring job which returns all rows that do not have a completed status and have been in existence for more than four seconds?

> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US