If you need to export a large amount of data, AQT has a fast but basic export tool. How to use this is described in this section.
A lot of the time taken to export your data is the time taken to process all the columns in your table. This is particularly true if your table contains a lot of columns. You can speed the export considerably by generating a single column from the table. For instance, instead of doing a csv export of:
select col1, col2, col3 from table
you run a query such as:
select '~' || col1 || '~,' || col2 || ',~' || col3 || '~' from table
here (for the sake of clarity), the string delimiter is a tilde ~. col1 and col3 are character, col2 is numeric. This query generates a single column from the database; the data in this column is a csv export of the data in the table. You then do a fixed-format export of this query.
Secondly, AQT has a fast export module designed for use with queries such as this. This is a pared-down and optimized export module. This is described later.
AQT can generate an SQL statement that creates a csv-export from your table. This is done as follows:
The generated SQL statement will use the column delimiter and string delimiter as specified in the Export options.
All the formatting of the export data is done within this SQL statement. You will need to manually change the SQL statement if you have any particular data formatting requirements. For instance, if your data is likely to contain either line-feed characters or the string-delimiter character, you may wish to amend the SQL to remove these characters.
If you are generating a csv file, and wish to see whether it is formatted correctly, the Data Loader window has a tool that allows you to do this:
This will split the file into separate columns based on your delimiters. This makes it very easy to view the contents of a csv file, and to check that the data is being generated correctly.
When exporting your data, you can specify that AQT is to use a Fast Export module. This is done by coding fastmode=yes on the --aqt export scripting statement. The Fast Export module is a highly trimmed down and optimized module for these types of exports. It is not to be specified for normal exports: