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?
Well, one of my utilities uses command-line operations like:
execute performance_snapshot.latches(30)
Which takes a 30 delta snapshot of v$latch on demand.
And I have seen numerous systems which
do:
loop
dbms_lock.sleep(60); -- checfk for data and process itend loop
It can be much more efficient (and, with suitable modification, precise) than using dbms_job to get the same effect.
Unfortunately many of them forget to test for an exit condition, and hit a little KGL lock problem on object.
-- Jonathan Lewis http://www.jlcomp.demon.co.uk Author of: Practical Oracle 8i: Building Efficient Databases Next Seminar - Australia - July/August http://www.jlcomp.demon.co.uk/seminar.html Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Ed prochak wrote in message ...Received on Mon May 06 2002 - 05:02:45 CDT
>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.
>
![]() |
![]() |