Skip to Main Content
  • Questions
  • How to retrieve the 200millions of record into txt file using select query?

Breadcrumb

Easter

Question and Answer

Chris Saxon

Thanks for the question, Tamilselvi .

Asked: February 03, 2020 - 2:50 pm UTC

Answered by: Chris Saxon - Last updated: February 04, 2020 - 1:51 pm UTC

Category: PL/SQL - Version: 12c

Viewed 100+ times

You Asked

Hi Tom,
We have 200+millions of records in our table, we have to retrieve all the records into text file without impacting the performance. I tried using DBMS_parallel_execute but this doesn’t have return type. Is there a way to get all Millions of records into txt file with out using Parallel in our query?

and we said...

Run the query in SQL*Plus/SQLcl in parallel, spooling the output.

e.g.

set feed off
set echo off
set pages 0
spool out.txt
select /*+ parallel */... from ...
spool off


We're not taking reviews currently, so please try again later if you want to add a review.

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.