I'm using sql plus to execute a query (a select) and dump the result into a file, using spool option. I have about 14 millions lines, and it takes about 12 minutes to do the dump. I was wondering if there is something to make the dump faster?
Here below my sql plus options:
whenever sqlerror exit sql.sqlcode
set pagesize 0
set linesize 410
SET trimspool ON
set heading on
set feedback off
set echo off
set termout off
spool file_to_dump_into.txt
select * from mytable;
Thanks.
Are you concatenating & delimiting your columns, or are you exporting fixed-width?
See this documentation on SQL*Plus Script Tuning. Specific to your script, here are a few possible ways to speed it up:
Hope this helps!