Home » Other » Client Tools » UTL_FILE
UTL_FILE [message #648934] Mon, 07 March 2016 20:26 Go to next message
mskphani
Messages: 5
Registered: March 2016
Junior Member
Hi

I have around 1 million records that need to be written to a csv file. I have used utl_file. It's taking more time. Is there any way to speed up the writing process. Thanks for your help.
Re: UTL_FILE [message #648935 is a reply to message #648934] Mon, 07 March 2016 20:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Welcome to this forum.

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read

sqlplus scott/tiger
set colsep ,
set pages 0
spool emp.csv
SELECT * FROM EMP;
SPOOL OFF
EXIT
Re: UTL_FILE [message #648956 is a reply to message #648935] Tue, 08 March 2016 12:39 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
You have to run the commands from a script (file.sql) file for all the commands to work correctly.


sqlplus scott/tiger
set colsep ,
set pages 0
SET FEEDBACK OFF
SET ECHO OFF
SET LINESIZE 20000
SET TRIMSPOOL OFF
SET VERIFY OFF
SET HEADING OFF
SET TERMOUT OFF
spool emp.csv
SELECT * FROM EMP;
SPOOL OFF
EXIT
Previous Topic: Purpose of attached special Icon
Next Topic: Someone please explain this behavior with multi-byte characters
Goto Forum:
  


Current Time: Sun Dec 22 00:45:55 CST 2024