Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Question about spooling to flat file
In article <8tq3s3$maf$1_at_nnrp1.deja.com>, I can not image that creating a table and then spool the result would be faster (even if you use "create table xyz unrecoverable as select ..."). You can test which way is faster by adding:
spool myFile
select to_char(sysdate, 'YYYY/MM/DD/HH/MI/SI') from null; -- can not remeber the exact syntax here, but you want to see the seconds info
select to_char(sysdate, 'YYYY/MM/DD/HH/MI/SI') from null;
spool off
this way you know how long it takes. Also keep in mind that if you run some sql the 2nd time, it finds it from cached memory. So to make sure you compare the results in similar condition, you might want to shut down the instance and bring it back up again before you run the script in order to compare them fairly.
Hope this helps.
Guang
joe17836_at_my-deja.com wrote:
> In article <8tq3is$m4q$1_at_nnrp1.deja.com>,
> gmei_at_my-deja.com wrote:
> > Why do you need to create a table? You can spoll your query result
to
a
> > file directly:
> >
> > ---
>
> Yes, I know. I suppose my question was poorly worded. The question
is
> which way is faster: spooling the query result directly to the file or
> creating a table first and then spooling to a file? I have runs some
> jobs which suggest to me that the latter method is faster (but I can't
> for the life of me figure out why that would be the case).
>
> Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Before yo
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Nov 01 2000 - 21:27:22 CST
![]() |
![]() |