Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: dbms_output and trigger
Mark C. Stock wrote:
> <sybrandb_at_yahoo.com> wrote in message
> news:1128673533.967653.47990_at_g14g2000cwa.googlegroups.com...
>
>>As far as I discovered, before being flushed to stdout, the output goes >>to your PGA. >>If the output is never flushed, you can run out of PGA. >>That happened to me once. >>So you may think the output is going into a 'black hole', but it isn't, >>and it can potentially bite you. >> >>-- >>Sybrand Bakker >>Senior Oracle DBA >>
While your conclusion may well be valid it is not the entire story:
SQL> set timing on
SQL> BEGIN
2 FOR i IN 1 .. 200000 LOOP
3 dbms_output.put_line(i);
4 END LOOP;
5 END;
6 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.26
SQL> BEGIN
2 FOR i IN 1 .. 200000 LOOP
3 NULL;
4 END LOOP;
5 END;
6 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
/
Test with loops of any size from 50000 up I see a cost to dbms_output.put_line even when it is not enabled.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Fri Oct 07 2005 - 10:25:27 CDT