Maximizing SQL*Loader Performance
Maximizing SQL*Loader Performance
SQL*Loader is flexible and offers many options that should be considered to maximize the speed of data loads. These include:
● Use Direct Path Loads - The conventional path loader essentially loads the data by using standard insert statements. The direct path loader (direct=true) loads directly into the Oracle data files and creates blocks in Oracle database block format. The fact that SQL is not being issued makes the entire process much less taxing on the database. There are certain cases, however, in which direct path loads cannot be used (clustered tables). To prepare the database for direct path loads, the script $ORACLE_HOME/rdbms/admin/catldr.sql.sql must be executed.
● Disable Indexes and Constraints. For conventional data loads only, the disabling of indexes and constraints can greatly enhance the performance of SQL*Loader.
● Use a Larger Bind Array. For conventional data loads only, larger bind arrays limit the number of calls to the database and increase performance. The size of the bind array is specified using the bindsize parameter. The bind array's size is equivalent to the number of rows it contains (rows=) times the maximum length of each row.
● Use ROWS=n to Commit Less Frequently. For conventional data loads only, the rows parameter specifies the number of rows per commit. Issuing fewer commits will enhance performance.
● Use Parallel Loads. Available with direct path data loads only, this option allows multiple SQL*Loader jobs to execute concurrently.
$ sqlldr control=first.ctl parallel=true direct=true
$ sqlldr control=second.ctl parallel=true direct=true
● Use Fixed Width Data. Fixed width data format saves Oracle some p
相关文档:
Server数据库中实现最优最简的整个过程。
算法是计算机科学中一个重要的研究方向,是解决复杂问题的关键。在计算机世界中,算法无处不在。数据库是存储数据和执行大批量计算的场所,在数据库中使用一些简单的SQL命令,进行存储、查询、统计、以解决现实世界中的问题已经是屡见不鲜。随着数据量的大幅度增加和业务规 ......
表结构和数据如下(表名Test):
NO VALUE NAME
1 a 测试1
1 b 测试2
1 c ......
1. 说明:复制表(只复制结构,源表名:a,新表名:b)
SQL: select * into b from a where 1<>1;
2. 说明:拷贝表(拷贝数据,源表名:a,目标表名:b)
SQL: insert into b(a, b, c) select d, e, f from b;
3. ......
1 :普通SQL语句可以用exec执行
Select * from tableName
exec('select * from tableName')
exec sp_executesql N'select * from tableName' -- 请注意字符串前一定要加N
2:字段名,表名,数据库名之类作为变量时,必须用动态SQL
declare @fname varchar(20)
set @fname = 'FiledName'
Select @fname from tab ......
1.update a set a.nickname=b.nickname from tab1 a,tab2 b where a.username=b.username
2.Update student_score set
student_score.level=level_about.level from
level_about where student.score
between level_about.start_score and level_about.end_score ......