SSIS Design1: Source Data extraction

Source: Internet
Author: User
Tags ssis

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.