Home » SQL & PL/SQL » SQL & PL/SQL » What is the best method to fetch data from a table and write into a csv file.
What is the best method to fetch data from a table and write into a csv file. [message #650981] Mon, 09 May 2016 06:16 Go to next message
sibashishnayak
Messages: 9
Registered: May 2014
Junior Member
I have a requirement to fetch data from some tables through a query and write them into a csv file.
UTL_FILE concept is taking long time (more than 30 mins) to generate the csv as millions of records present in the database.
Please suggest which is the best method to achieve the goal.

I am using oracle 11g database.
Re: What is the best method to fetch data from a table and write into a csv file. [message #650982 is a reply to message #650981] Mon, 09 May 2016 06:24 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
sibashishnayak wrote on Mon, 09 May 2016 06:16
I have a requirement to fetch data from some tables through a query and write them into a csv file.
UTL_FILE concept is taking long time (more than 30 mins) to generate the csv as millions of records present in the database.
Please suggest which is the best method to achieve the goal.

I am using oracle 11g database.


Just use a simple sql query (no pl/sql needed) and set COLSEP

see https://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve040.htm#SQPUG069

Previous Topic: Revoke insert and Update access from schema owner
Next Topic: Table Partitioning:
Goto Forum:
  


Current Time: Fri Apr 19 10:44:26 CDT 2024