Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to delay the execution of an SQL statement?
"FC" <flavio_at_tin.it> wrote in message news:<T5vA8.93376$vF6.2796869_at_news2.tin.it>...
> "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
> news:3CD18E4E.35BE24BE_at_exesolutions.com...
> > FC wrote:
> >
> > > "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
> > > news:3CD00A75.99B75BA1_at_exesolutions.com...
> > > > Ed Prochak wrote:
> > > >
> > > > > I'm always curious about this is a database context: Why do you want
> a
> > > > > delay?
> > > > > (I've done lots of real-time/embedded programming where this kind of
> > > > > thing is sometimes appropriate, but I don't know of any database
> reasons
> > > > > for this.)
> > > > >
> > > > > ed
> > > > >
[snip]
> > >
> > > Well,
> > > I have a similar question, I'd like to make a stored procedure enter
> into a
> > > "stand-by" state without consuming too much CPU time.
> > > Say for instance I am looping waiting for a user triggered event, how
> can I
> > > doze for half a second and then wake up again ?
> >
> > What are you going to do if the triggering event never happens?
> >
> > Daniel Morgan
> >
>
> Well, this is required only for running a test and simulate some things
> going on in a production plant, in the "real" world, there won't be any
> trace of it...
>
> Cheers,
> Flavio
Flavio,
So your example is a test environment. That could be helpful. But I'm still wondering what are the uses for the Sleep function in a production database stored procedure? Don't everybody jump in at once.
(BTW Dan I liked your example.) Waiting for input is not really a good example. (In general polling is a poor way to handle input.)
Anyone, anyone...
Ed Received on Sun May 05 2002 - 18:52:59 CDT