0% found this document useful (0 votes)
36 views

ConventionalVsDirect Path

Conventional path SQL*Loader loads data more slowly since it uses SQL INSERT statements, but it can load into cluster tables and validate check constraints. Direct path loading is faster since it writes data directly to disk without using the buffer cache, but it cannot load into clusters and disables constraints during loading. Direct path also locks tables exclusively during load.

Uploaded by

Pratik Gandhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

ConventionalVsDirect Path

Conventional path SQL*Loader loads data more slowly since it uses SQL INSERT statements, but it can load into cluster tables and validate check constraints. Direct path loading is faster since it writes data directly to disk without using the buffer cache, but it cannot load into clusters and disables constraints during loading. Direct path also locks tables exclusively during load.

Uploaded by

Pratik Gandhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Conventional Path SQL*Loader uses the SQL INSERT statement and bind array buffer to load data.

Makes use of the Database buffer cache and may increase contention for the resources among other users.

Direct Path It passes on the data to the Load Engine of the database, which creates a Column Array structure. Avoids buffer cache and writes directly to the Disk. Can make use of Asynchronous I/O if available/supported on the OS.

Slower since the SQL INSERT statements have to be generated, passed to Oracle, and executed.

Faster since, the Load Engine converts the column array structure directly to Oracle Data Blocks and adds it to the Tables existing segment.

While loading the data, searches for blocks with enough free space, into which the rows can be inserted. Does not lock the table being loaded into.

Does not search the existing blocks. New blocks are formatted and added to the existing segment. Locks table in Exclusive mode. Hence, should not be used if concurrent access to the table is required during the load. The 10046 trace output shows: Lock table <table_name> exclusive mode nowait;

Can be used to load into Clustered tables Check constraints are enabled during the load. Records not satisfying the constraint are rejected and written into the BAD file.

Cannot be used to load into a cluster. The constraints are disabled during the load. It explicitly executes an alter table <table_name> disable constraint <constraint_name> statement before loading into the table.

Can be used to load into Varrays Can be used to load into BFILE columns.

Cannot be used to load into Varrays Cannot be used to load into BFILE columns.

Can be used to load into a Single partition

Direct path cannot be used to load into a

of a table having Global indexes

particular partition of the table if the table has a global index defined on it.

Cannot be used for loading data in Parallel. But, you can use multiple load session concurrently inserting into the same table. Automatically inserts default values for the columns, if any.

Parallel loading of data is possible.

The default value specified for the column is not inserted. If it is a null column, it inserts a null.

Indexes Unique Index on the table is in a valid state after the load. The uniqueness of the data for the index column is maintained. Records violating the uniqueness are rejected and written into the BAD file. If the table has any indexes, corresponding keys are added into the index for each new row inserted into the table. After each block is formatted, the new index keys are put in a sort (temporary) segment. The old index and the new keys are merged at load finish time to create the new index. The index does not require a re-build at the end of the load. Also, no extra storage is required. But, since the index is updates for each new row, it increases the processing time. Loading into Objects If the type has a User-defined constructor matching the arguments of the attributevalue constructor, conventional path calls the User-defined constructor. If the type has a User-defined constructor not matching the arguments of the It is not possible to invoke the userdefined constructor in direct path loading. Direct path calls the Argument-value constructor. The index needs to be re-built at the end of the load. The old index, new index and sort segment all require storage space until the indexes are merged. The Uniqueness of the data is not validated. The unique index is in an UNUSABLE state at the end of the load.

attribute-value constructor, you can invoke the user-defined using an SQL Expression. Can be used to load into Parent and child table at the same time. Cannot be used to load into Parent and child table at the same time

You might also like