Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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Êý¾Ý¿âÔ¶³ÌÁ¬½Ó¼°ÅäÖ÷½·¨

Ò»£º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 ......

̸SQL Server 2005ÖеÄT

 ¡¡1¡¢varchar(max)¡¢nvarchar(max)ºÍvarbinary(max)Êý¾ÝÀàÐÍ×î¶à¿ÉÒÔ±£´æ2GBµÄÊý¾Ý£¬¿ÉÒÔÈ¡´útext¡¢ntext»òimageÊý¾ÝÀàÐÍ¡£
CREATE TABLE myTable
(
id INT,
content VARCHAR(MAX)
)
¡¡¡¡2¡¢XMLÊý¾ÝÀàÐÍ
¡¡¡¡XMLÊý¾ÝÀàÐÍÔÊÐíÓû§ÔÚSQL ServerÊý¾Ý¿âÖб£´æXMLƬ¶Î»òÎĵµ¡£
¡¡¡¡´íÎó´¦Àí Error Handling
¡ ......

SQL ÈÕÆÚÅ̵ã

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 ......

SQL UPDATEÈçºÎ¹¤×÷

ÔÚSQL UPDATEÓï¾äÖУ¬¶Ô»»Á½¸ö±äÁ¿µÄÖµ£¬²»ÐèÒªÁÙʱ±äÁ¿¡£=ÓÒ²àµÄÖµÔÚÕû¸öUPDATEÓï¾äÖж¼ÊÇÒ»Öµģ»ËùÓеĸüÐÂͬʱ·¢Éú£¬¶ø²»ÊÇÒ»¸ö½Ó×ÅÒ»¸ö·¢Éú¡£
ÀýÈ磺
UPDATE offenceTeam
        SET goalShooter=wingAttack,
          & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ