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
相关文档:
1、没有索引或者没有用到索引(这是查询慢最常见的问题,是程序设计的缺陷)
2、I/O吞吐量小,形成了瓶颈效应。
3、没有创建计算列导致查询不优化。
4、内存不足
5、网络速度慢
6、查询出的数据量过大(可以采用多次查询,其他的方法降低数据量)
7、锁或者死锁 ......
在调用服务器后要继续在服务器中保留数据通常很难,你可以用SQL Server来进行会话状态管理(用户会话数据)。以下教你怎样用它来进行管理。
在页面开发中,在服务器调用里保留数据是一个常见的不好解决的难题。你也许需要为你的应用程序或特殊用户的会话保存信息。存储这样的数据被称为状态管理,ASP.NET为你提供 ......
DECLARE @dt datetime
SET @dt=GETDATE()
DECLARE @number int
SET @number=3
--1.指定日期该年的第一天或最后一天
--A. 年的第一天
SELECT CONVERT(char(5),@dt,120)+'1-1'
--B. 年的最后一天
SELECT CONVERT(char(5),@dt,120)+'12-31'
--2.指定日期所在季度的第一天或最后一天
--A. 季度的第一天
SELECT CON ......
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.检查你是否限制了文件增长:
企业管理器--右键你的数据库--属性--数据文件--看看有没有设置文件的最大值
2.检查你的磁盘分区格式,如果不是NTFS分区,则会有限制,将磁盘分区格式改成NTFS
&n ......