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: Fast output of SQL statement to file SQL Plus

Re: Fast output of SQL statement to file SQL Plus

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 14 Jun 2007 15:11:05 -0700
Message-ID: <1181859063.96052@bubbleator.drizzle.com>


sybrandb_at_hccnet.nl wrote:

> On Wed, 13 Jun 2007 15:19:57 -0700, William Robertson
> <williamr2019_at_googlemail.com> wrote:
> 
>> On Jun 13, 7:40 pm, sybra..._at_hccnet.nl wrote:

>>> On Wed, 13 Jun 2007 10:46:14 -0700, Mensur <mmedic..._at_gmail.com>
>>> wrote:
>>>
>>>> Is there a way to quickly output large number of rows from a SQL
>>>> statement to a file through SQL plus. I tried using spool but that is
>>>> slow. Is there another way? I am using Oracle 10g.
>>>> Thanks!
>>> Put the sql in a file, the spool command prior to the select, and you
>>> won't have to scroll your output over the screen.
>>>
>>> --
>>> Sybrand Bakker
>>> Senior Oracle DBA
>> Also worth setting TERM OFF, TRIM ON and ARRAYSIZE to a hundred or so.
>> I've always found it very fast.
> 
> IIRC TERM is always off during SPOOL and TRIM always ON.
> ARRAY 100 can result in delays when output length * ARRAY > SDU.

Anyone paying attention to Oracle docs ... ok that isn't exactly everyone, should have their SDU set to 32767 ... or at least have tested it in their environment.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Jun 14 2007 - 17:11:05 CDT

Original text of this message

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