Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Faster option than utl_file
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-lReceived on Wed Feb 22 2006 - 18:42:56 CST
![]() |
![]() |