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
相关文档:
一:C# 连接SQL数据库
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User ID=myUse ......
表结构和数据如下(表名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. ......
getdate //获得系统当前日期
datepart //获取日期指定部分(年月日时分表)
getdate()函数:取得系统当前的日期和时间。返回值为datetime类型的。
用法:getdate()
例子:
select getdate() as dte,dateadd(day,-1,getdate()) as nowdat
输出结果:
dte nowdat
--------------------------- ----------------- ......
1.检查你是否限制了文件增长:
企业管理器--右键你的数据库--属性--数据文件--看看有没有设置文件的最大值
2.检查你的磁盘分区格式,如果不是NTFS分区,则会有限制,将磁盘分区格式改成NTFS
&n ......