fast_select block
Unload will natively support fairly complex SQL, and the select structures that unload can natively support are displayed later in this section starting with the fast_select block. If you require a more complex select structure, you can code the SQL, but do not set the DB2 option to NO, which will allow your query to be handed to Db2® for collecting the requested rows.
The fast_select block signals the beginning of the SELECT clause and should be the first option in the SELECT clause. SELECT clause options that are specific to a fast_select block should immediately follow that fast_select block. The options for a fast_select block apply only to a single fast_select block statement.
The
following rules apply to the fast_select block:
- This block must end with a semicolon.
- If your select statement is too complex for unload to process, it will be passed to Db2 to collect the rows. In this situation, the unload cannot be run against a Db2 backup.
- The fast_select block structure satisfies the basic objective of unload, which is to quickly unload bulk data. Not all combinations of underlying SQL operands and operators found in the current Db2 SQL Reference will be natively supported.