1:01:13 2008 Copyright (c) 1982, 2005, Oracle. All rights reserved. 达到提交点 - 逻辑记录计数 4 SQL> select * from book partition (p1); BOOK_ID BOOK_TITLE BOOK_PRICE BOOK_PAGES ---------- ----------------------------------- ---------- ---------- 1 Oracle Essentials bbbbbbbbbbbbb 3495 355 2 SQL*Plus: The Definitive 3995 502 3 Oracle PL/SQL 4495 87 4 Oracle8 Design Tips 1495 115 SQL> select * from book partition (p2); 未选定行 SQL> 9, null if 空替代: LOAD DATA INFILE * REPLACE INTO TABLE michigan_features fields terminated by "," optionally enclosed by '"' ( feature_name , short_feature_name , elevation NULLIF elevation = ' 0', feature_type NULLIF feature_type = 'ppl', county ) begindata MI ,Chatham,0,dl,Alger MI ,Shingleton,821,al,Alger MI, Rumely,0,ppl,Alger MI ,Sundell,1049,,, 例子: drop table michigan_features; create table michigan_features( feature_name varchar2(100), short_feature_name varchar2(100), elevation number, feature_type varchar2(100), county varchar2(100)) SQL> select feature_type from michigan_features; FEATURE_TYPE ----------------------------------------------------------- dl al SQL*Loader 数据的提交: 一般情况下是在导入数据文件数据后提交的。 也可以通过指定 ROWS= 参数来指定每次提交记录数。 提高 SQL*Loader 的性能: 1) 一个简单而容易忽略的问题是,没有对导入的表使用任何索引和/或约束(主键)。如果这样做,甚至在使用ROWS=参数时,会很明显降低数据库导入性能。 2) 可以添加 DIRECT=TRUE来提高导入数据的性能。当然,在很多情况下,不能使用此参数。 3) 通过指定 UNRECOVERABLE选项,可以关闭数据库的日志。这个选项只能和 direct 一起使用。 4) 可以同时运行多个导入任务. 5)可以使用readsize 参数加大读入区内存大小, 默认为64K 一般的系统最大支持到20M 6)SKIP_INDEX_MAINTENANCE = {TRUE | FALSE} 在DIRECT 方式load 数据的时候,设置是否维护索引可以通过 此参数来设置 7)SKIP_UNUSABLE_INDEXES = {TRUE | FALSE} 在DIRECT 方式load 数据的时候 如果有索引为unusable 是否继续load 数据 常规导入与direct导入方式的区别: 常规导入可以通过使用 INSERT语句来导入数据。Direct导入可以跳过数据库的相关逻辑(DIRECT=TRUE),而直接将数据导入到数据文件中。 常规导入的过程 STEP 1 Generate SQL commands for the data to be loaded. STEP 2 Process the SQL commands (parse, fetch, execute). STEP 3 Find partial data blocks, or get new extents. STEP 4 If required blocks are not in the buffer cache, read the data blocks from disk. STEP 5 Fill the appropriate data blocks in the buffer cache. STEP 6 Write data blocks to the disk. Direct 导入过程 STEP 1 Format the input data into Oracle data blocks. STEP 2 Get new extents for the table to be loaded. STEP 3 Write the formatted data blocks to the disk. 使用direct 方式导入的一些限制: Restrictions on Direct Path Loads Clustered tables Object columns (Oracle9i can handle these) LOB columns (Oracle9i can handle these) VARRAY columns Nested tables (Oracle9i can handle these when they are loaded separately) REF columns (Oracle9i can handle these) BFILE columns 转载本文希望能给你提供帮助,也在此谢谢原作者。
本文出自“小小狗窝”
|