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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to delay the execution of an SQL statement?

Re: How to delay the execution of an SQL statement?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 6 May 2002 11:02:45 +0100
Message-ID: <1020679305.17322.0.nnrp-08.9e984b29@news.demon.co.uk>

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 it
    end 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 ...


>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.
>
Received on Mon May 06 2002 - 05:02:45 CDT

Original text of this message

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