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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Unexplainable disk activity after simple select statement

Re: Unexplainable disk activity after simple select statement

From: Keith E. Moore <kmacs_at_gandalf.kmacs.com>
Date: 1998/02/15
Message-ID: <slrn6edu6a.4pe.kmacs@gandalf.kmacs.com>#1/1

On Sun, 15 Feb 1998 11:23:09 GMT, Matthew Heiman <boo_at_deltanet.com> wrote:
>I am trying to export database tables to ascii files for archiving. I
>basically write straight sql code that will spool the output of a
>select * from table statement. For each entry, I have to do this
>62 times. That is, I have to open, write the output of the select
>statement, and close the file 62 times for each entry that I process.
>

  I don't quite understand why you need to open/write/close 62 times, but when you close a file the OS will generally try to write the data to disk as soon as possible, or if you are on UNIX and the filesystem is mounted "sync", then the writes are not cached.

If the filesystem is mounted "sync", then you don't have many options besides doing your own caching. If it's just because of the close, I would recommend doing a fflush() instead, which will generally result in the data being written quickly, but your app will not wait for it.

>The strange thing, the select statement seems to work fairly quickly
>but then afterwards I have a lot of unexplainable disk activity that
>is slowing my outputs to a crawl. The larger the output that is
>generated from the select statement, the longer the stall seems to be.
>
>Any ide what is going on?

  If it really slows down your app I would guess that the filesystem has write caching disabled.

>
>Any help would be greatly appreciated.
>
>Matt Heiman
>boo_at_deltanet.com

-- 
-- Keith Moore
   President
   KMA Computer Solutions, Inc.

-- 
/*----C/C++--Java--VB--Pro*C--SQL--OCI--Java--Delphi--ODBC--COBOL-----* 
 *        When the project must be saved at all costs:                *
 * KMA Computer Solutions, Inc.   Project Troubleshooting/Recovery    *
 *---------Linux---AIX---HPUX---SYSV---Novell---NT---OS/2---'95-------*/
Received on Sun Feb 15 1998 - 00:00:00 CST

Original text of this message

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