-
UTL_FILE or Sqlplus Spool
Hello all,
Could anybody suggest me if UTL_FILE or Sqlplus Spool has better performance to dump around one million rows in some 80+ text files. I googled for references, ended up with these two forum threads, with no clear clue on what to follow with:
http://www.dbasupport.com/forums/arc...p/t-44153.html
http://www.dbforums.com/showthread.php?t=1616497
Merry X-mas to all !!!
Thanking you all in advance,
gtcol
-
I would go with simple spool command.
Follow this rule:
If you can do the job in a single SQL statement, do it.
If it can not be done in SQL, use PL/SQL.
-
What about performance, as it is said, UTL_FILE is faster while reading/writing bulk number of records. Spool is better with smaller numbers.
-
Originally Posted by gtcol
What about performance, as it is said, UTL_FILE is faster while reading/writing bulk number of records. Spool is better with smaller numbers.
TEST, TEST, TEST
-
Sure Tamil,
I was just expecting some advices from the seniors as I don't have a dev db with me for the time being, for testing purpose.
Thanking you once again,
gtcol
-
Originally Posted by gtcol
What about performance, as it is said, UTL_FILE is faster while reading/writing bulk number of records. Spool is better with smaller numbers.
Is this a recurrent or a one-time task?
If it's a one-time task I'll go with sql spool solution, if this is a recurrent task I would go with pl/sql ult_file solution.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
Thanks PAVB for your valuable input.
I did with sqlplus spool this time, but I am also working with a UTL_FILE script as I can see this task recurring in the future. And testing is still there. .
gtcol
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|