Re: Faster option than utl_file

  • From: "Connor McDonald" <mcdonald.connor@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 23 Feb 2006 08:42:56 +0800

On 2/23/06, rjamya <rjamya@xxxxxxxxx> 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@xxxxxxxxx
web:   http://www.oracledba.co.uk

"Semper in excremento, sole profundum qui variat"

Other related posts: