简体   繁体   中英

Oracle Sql Developer export slow

I am running some queries with Oracle SQL Developer, and want to export the output to an csv file. But the export takes way too long, it seems to be re-running the whole query again. Here are my steps, please let me know if I am doing anything wrong here.

  1. Run the query with 'Run Statement'
  2. Results returned after 10 minutes, results shown in 'query result' underneath.
  3. Right click the results, click 'export' and select 'csv' in export wizard.
  4. Click Next, and Next to save the results.
  5. Takes 10-30 minutes to output 10,000 rows data.

I understand there is a difference between showing results in grid, vs full results. But something seems to be wrong here and it is wasting too much of my time exporting data.

Thanks too all your help.

It IS running the whole query again.

To avoid that, fetch all the results to the grid, and then EXPORT them.

Ctrl+End will do that.

I talk about this here https://www.thatjeffsmith.com/archive/2012/03/how-to-export-sql-developer-query-results-without-re-running-the-query/

But WHY does SQL Developer force the 2nd query execution ?

Good question.

If you do force all of the rows back into the grid, you are going to be consuming a decent amount of memory. Some query result sets are larger than others, and not all of us have 64 bit monsters to run our tools on. So, in order to conserve machine resources and memory, we just run the query again and write the data directly to the destination and bypass the data grid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM