Re: SQLLDR - Strange Question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 19 Oct 2001 11:03:22 -0700
Message-ID: <9qppta01pff_at_drn.newsguy.com>


In article <1003507191.8807.0.nnrp-14.d4f028a1_at_news.demon.co.uk>, "Tim says...
>
>Hi,
>
>I've been writing a UNIX korn shell script to collect output from SQLLDR
>(v8.1.7.0.0) - the "Commit point reached - logical record count 60420"
>stuff - and have noticed that when this output is redirected from standard
>output to a file (either using redirect '>>' or piped through 'tee -a', the
>output seems to be buffered before being written to the file. Suspiciously,
>the file only seems to be written to in 8K blocks (disk block size or
>coincidence? I have experimented on both direct IO and straight disks, and
>the result is the same) and so for collecting live statistics about data
>loads, it makes for pretty strange results.
>
>Can anyone explain what's happening here with SQLLDR (I assume it's the
>application which is doing this) and also has anyone got any ideas for a
>work around for collecting the load statistics/progress which doesn't
>involve performing a count on the table which would obviously be potentially
>detrimental to performance.
>
>Thanks for any help!
>
>Cheers
>Tim
>
>

sqlldr, like most stuff, uses standard buffered IO to write. The C runtime buffers (typically 4k to 8k) of data before flushing.

It is pretty standard, most all tools write this way. It is perhaps more noticable in sqlldr since it might take a while to get 8k of output.

No way to alter its behaviour

--
Thomas Kyte (tkyte_at_us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Fri Oct 19 2001 - 20:03:22 CEST

Original text of this message