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: SLEEP Procs

Re: SLEEP Procs

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 14 Jan 2007 18:48:36 -0800
Message-ID: <1168829315.482160@bubbleator.drizzle.com>


DA Morgan wrote:

> So far so good.

And here are the final 2.

SQL> DECLARE
   2 stime TIMESTAMP(9);
   3 etime TIMESTAMP(9);
   4 BEGIN

   5    stime := SYSTIMESTAMP;
   6    dbms_lock.sleep(2100);
   7    etime := SYSTIMESTAMP;

   8 dbms_output.put_line(etime-stime);    9 END;
  10 /
+000000000 00:35:00.000000000

PL/SQL procedure successfully completed.

SQL> DECLARE
   2 stime TIMESTAMP(9);
   3 etime TIMESTAMP(9);
   4 BEGIN
   5 stime := SYSTIMESTAMP;
   6 user_lock.sleep(210000);
   7 etime := SYSTIMESTAMP;
   8 dbms_output.put_line(etime-stime);    9 END;
  10 /
+000000000 00:35:00.000000000

PL/SQL procedure successfully completed.

I'll declare the bug fixed unless some has substantially more time than I do to play with longer increments. The above 4 tests took 2.33 hours. To do the largest test show, 15K seconds, would take 1000 hours (42 days).

Some people have way too much time on their hands. <g>

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Jan 14 2007 - 20:48:36 CST

Original text of this message

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