OCP-1Z0-052-V8.02-93题

93. You are using flat files as the data source for one of your data warehousing applications. To optimize

the application performance, you plan to move the data from the flat files to clustered tables in an Oracle

database. 

While migrating the data, you want to have minimal impact on the database performance and optimize the

data load operation. Which method would you use to load data into the Oracle database?

A.Use the external table population. 

B.Use the Oracle Data Pump export and import utility.

C.Use the conventional path data load of the SQL*Loader utility.

D.Use the INSERT INTO...SELECT command to load the data.

Answer: C  

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_modes.htm#SUTIL009


Conventional Path Load

Conventional path load (the default) uses the SQL INSERT statement and a bind array buffer to load data into database tables. This method is used by all Oracle tools and applications.

When SQL*Loader performs a conventional path load, it competes equally with all other processes for buffer resources. This can slow the load significantly. Extra overhead is added as SQL statements are generated, passed to Oracle, and executed.

The Oracle database looks for partially filled blocks and attempts to fill them on each insert. Although appropriate during normal use, this can slow bulk loads dramatically.


When to Use a Conventional Path Load

If load speed is most important to you, then you should use direct path load because it is faster than conventional path load. However, certain restrictions on direct path loads may require you to use a conventional path load. You should use a conventional path load in the following situations:

  • When accessing an indexed table concurrently with the load, or when applying inserts or updates to a nonindexed table concurrently with the load

    To use a direct path load (except for parallel loads), SQL*Loader must have exclusive write access to the table and exclusive read/write access to any indexes.

  • When loading data into a clustered table

    A direct path load does not support loading of clustered tables.

  • When loading a relatively small number of rows into a large indexed table

    During a direct path load, the existing index is copied when it is merged with the new index keys. If the existing index is very large and the number of new keys is very small, then the index copy time can offset the time saved by a direct path load.

  • When loading a relatively small number of rows into a large table with referential and column-check integrity constraints

    Because these constraints cannot be applied to rows loaded on the direct path, they are disabled for the duration of the load. Then they are applied to the whole table when the load completes. The costs could outweigh the savings for a very large table and a small number of new rows.

  • When loading records and you want to ensure that a record is rejected under any of the following circumstances:

    • If the record, upon insertion, causes an Oracle error

    • If the record is formatted incorrectly, so that SQL*Loader cannot find field boundaries

    • If the record violates a constraint or tries to make a unique index non-unique

Direct Path Load

Instead of filling a bind array buffer and passing it to the Oracle database with a SQL INSERT statement, a direct path load uses the direct path API to pass the data to be loaded to the load engine in the server. The load engine builds a column array structure from the data passed to it.

The direct path load engine uses the column array structure to format Oracle data blocks and build index keys. The newly formatted database blocks are written directly to the database (multiple blocks per I/O request using asynchronous writes if the host platform supports asynchronous I/O).

Internally, multiple buffers are used for the formatted blocks. While one buffer is being filled, one or more buffers are being written if asynchronous I/O is available on the host platform. Overlapping computation with I/O increases load performance.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值