The fastest way to insert data into
a relational database when using the
SAS/ACCESS engine is to use the
bulk-loading capabilities of the database. By default, the
SAS/ACCESS
engines load data into tables by preparing an SQL INSERT statement,
executing the INSERT statement for each row, and issuing a COMMIT.
If you specify BULKLOAD=YES as a DATA step or LIBNAME option, then
the database load utility is invoked. This invocation enables you
to bulk load rows of data as a single unit, which can significantly
enhance performance. You can set the BULKLOAD option on the
Bulkload to DBMS property pane for the
target table. Some databases require that the table be empty in order to load records with
their bulk-load utilities. Check your database documentation for these restrictions.
For smaller
tables, the extra overhead of the bulk-load process might slow performance.
For larger tables, the speed of the bulk-load process outweighs the
overhead costs. Each SAS/ACCESS engine invokes a different load utility
and uses different options. For information about using the bulk-load
option for each SAS/ACCESS engine, see the online documentation for
each engine.
The
Use Bulkload for Uploading and
Bulkload
Options properties are available on the properties window
for each table in a query. The
Use Bulkload for Uploading property applies to the
source table. It is a valid option only when the source table is being uploaded to the DBMS
to create a homogeneous join. The
Bulkload to DBMS property applies to target tables and turns bulk loading on and off. The
Bulkload to DBMS property is not valid when the
Target Table is Pass Through property on the SQL Properties
pane is set to
Yes.
The option to bulk load tables applies only to source tables that are participating
in a heterogeneous join. Also, the user must be uploading
the table to the DBMS where the join is performed.