日期:2014-05-16  浏览次数:20495 次

实例演示使用并行和非并行选项的性能差异

比较direct方式使用并行和非并行选项的性能差异。

并行测试

创建测试表

create table sqlldr_paral

nologging

PARTITION BY HASH (sfzh)

(partition p1 tablespace users , partition p2tablespace zdry_tbs2 )

AS SELECT *FROM sfxx2 where 1=2 ;

 

sqlldr_paral.ctl

LOAD DATA

INFILE 'd:\flatfile\flatfile.dat'

APPEND

INTO TABLE sqlldr_paral

fields terminated by X'23'

TRAILING NULLCOLS

(zj,      

…字段太多省略

cjdwdm)

sqlldr_paral.par

USERID=zdrygk/zdrygk

CONTROL='d:\flatfile\sqlldr_paral.ctl'

DATA='d:\flatfile\flatfile.dat'

LOG='d:\flatfile\sqlldr_paral.log'

DIRECT=true

parallel=true

ERRORS=10000

 

执行

D:\flatfile>sqlldrparfile=d:\flatfile\sqlldr_paral.par

 

SQL*Loader: Release 11.2.0.1.0 - Production onMon Jan 7 23:21:42 2013

 

Copyright (c) 1982, 2009, Oracle and/or itsaffiliates.  All rights reserved.

 

 

Load completed - logical record count 3022375.

sqlldr_paral.log

Control File:  d:\flatfile\sqlldr_paral.ctl

Data File:     d:\flatfile\flatfile.dat

  BadFile:     d:\flatfile\flatfile.bad

  DiscardFile:  none specified

 

 (Allowall discards)

 

Number to load: ALL

Number to skip: 0

Errors allowed: 10000

Continuation:   none specified

Path used:      Direct- with parallel option.       -----这里指定了并行选项

 

Table SQLLDR_PARAL, loaded from every logicalrecord.

Insert option in effect for this table: APPEND

TRAILING NULLCOLS option in effect

 

 

 

 

Table SQLLDR_PARAL:

  3017264Rows successfully loaded.

  5111Rows not loaded due to data errors.

  0 Rows not loaded because all WHEN clauseswere failed.

  0 Rowsnot loaded because all fields were null.

 

  Dateconversion