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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Faster option than utl_file

Re: Faster option than utl_file

From: Connor McDonald <mcdonald.connor_at_gmail.com>
Date: Thu, 23 Feb 2006 08:42:56 +0800
Message-ID: <5e3048620602221642t7515c8daq9628efb4e6282b0d@mail.gmail.com>


On 2/23/06, rjamya <rjamya_at_gmail.com> wrote:
>
> <snip>
>
>
>
>

One quick hack for speeding up utl_file is to call the put_line less often.

ie, instead of

for i in 1 .. 99 loop

   utl_file.put_line(f, line<i>);

add some smarts to concatenate lines and only output them when they get close to the 32k limit for each line, ie

for i in 1 .. 99 loop
  if length(output_line) + length(line<i>) > 32k then     utl_file.put_line(output_line);
    output_line := line<i>;
  else
    output_line := output_line || chr(10) || line<i>;   end if;

hoepfully you get the idea from the pseudocode above.

hth
Connor

--
Connor McDonald
===========================
email: connor_mcdonald_at_yahoo.com
web:   http://www.oracledba.co.uk

"Semper in excremento, sole profundum qui variat"

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Feb 22 2006 - 18:42:56 CST

Original text of this message

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