ssis性能调优 学习笔记
1 SSIS Engine
SSIS Runtime engine 和 Data Pipeline engine(又称为“data flow task”);
2 Memory Buffer Architecture
Two factors affect row size:Number of columns和Width of each column
As a rule, select only the columns you need from data sources and assign conservation data types
whenever possible.
3 Execution Trees
Separate memory buffers enable threads to operate on data independently and in parallel.
Use the multicast transform to generate multiple buffers. This is one of the easiest
and most efficient ways to allocate additional memory buffers and to cast multiple
execution threads to use the server's physical resources efficiently to improve performance.
4 Synchronous and Asynchronous Processing
synchronous transformation:such as Character Map, Conditional Split, Multicast, and Row Count,
Derived Column,Data Conversion,Copy Column,Character Map,OLE DB Command,Script Command
asynchronous transformations:such as Lookup, Audit, OLE DB Command,
Merge,Merge Join,Pivot,Unpivot,Union All,Term Lookup,Data Mining Query
5 Data Blocking
Blocking Transformations:Aggregation,Sort
Partially Blocking Transformations:Merge,Merge Join,Pivot,Unpivot,Union All,Term Lookup,Data Mining Query
Row Transformations:Derived Column,Data Conversion,Copy Column,Character Map,OLE DB Command,Script Command
6 Non-blocking Transformations
Audit,Character Map,Conditional Split,Copy Column,Data Conversion,Derived Column,
Multicast,Percent Sampling,Row Count,Script Task,Import/Export Column,SCD,OLE DB Command,
7 Buffer Settings
BufferTempStoragePath
Buffer contents can be saved to temporary storage space in the file system. This setting is used to specify one or more folders for these temporary files.
DefaultBufferMaxRows
This is the maximum number of rows for each physical buffer allocation. Results larger than this setting will result in multiple buffers.
DefaultBufferSize
This setting is for the size of each buffer in the data flow, in bytes. Any value for this property should be divisible by 1,024 and is typically divided evenly into kilobytes (x 1,024) or megabytes (x 1,048,576). The default setting is 10,485,760 or 10 megabytes.
8 管理并行机制
包MaxConcurrentExecutables参数的默认值为-1。
可行的设置是修改为2,并且加上计算机处理器的个数。
9 数据源调优
(1) 创建索引,支持排序和联合查询;
(2)创建视图,存储过程,函数以封装复杂的查询;
(3)尽可能的减少用多表联合,外连接,合并,子查询等;
(4)执行查询前,最好进行执行计划;
(5)如果有多个用户访问,不建议采用“表锁”选项。
10 性能管理
(1) OLE DB provider for SQL Server 有一个快速加载选项。
(2)数据抽取时删除或不用索引;
(3)定义清楚的事务