The size of the data is determined by two aspects: the width of the row and the number of rows of data, in order to reduce the time of ETL run, can be optimized from the source data extraction, from the input data source control data quality and size, reduce conversion and IO.
One, reduce the width of the row
1, load only the required data columns
In data flow, the source adapter allows you to select the loaded table or view, although there are checkboxes to filter out unwanted data columns, but the problem is that the filtering process takes placein the client, in other words, all columns are passed from DB to SSIS Source adapter (which generates a large amount of IO overhead), and then deletes the selected amount data column in SSIS. We recommend that you use SQL Command to load only the data columns that you need in the SELECT clause.
2, converting data to a narrow data type during data extraction
Data sharpening is the conversion of data values to the smallest data type that can adequately represent its value, for example, if there is a column with a data type of int and a value of 0 and 1, then converting the data type to bit is better, and in 64bit systems, the length of each row is reduced by at least 3byte.
3, delete the spaces at both ends of the string type
Using LTrim (RTrim (String_column))
Two, reduce the number of data rows
1, use the Where condition to limit the number of data rows returned
Use fields such as datetime,row_version to implement incremental updates instead of repeatedly loading duplicate data
2, use the Where condition to filter invalid data
For some invalid data, you can use the WHERE clause to filter directly, to ensure that the entry ETL is valid data.
Three, during the extraction of data
1, solve magic number
A magic number is a value that is used to represent an unknown or null value. in a non-null DB, for example, Column uses a NOT NULL definition, and the magic number is required.
2, data sorting
Sorting data in SQL Server is more efficient than using the sort transformation in SSIS.
SSIS Design1: Source Data extraction