Optimizing SSIS package for millions of rows with Order by / sort in SQL command and Merge Join

拟墨画扇 提交于 2019-12-02 00:06:08

I have two recommendations:

Server side sorting

In OLE DB Source change the access mode to SQL Command. And use ORDER BY clause:

Select * from table ORDER BY col1, col2

After that you should open OLE DB Source advanced editor (Right click on the OLE DB source, show advanced editor) go to the columns tab and change the outputIsSorted property to True and set change the SortKeyPosition for the columns used in the ORDER BY clause.

Read data in chunks

I don't have good knowledge in MariaDB SQL syntax but i will provide some example in SQLite and Oracle:


Update 1 - Package problems

There are some problems in the package:

  • You are reading and writing from the same table
  • You are performing Update and delete tables on a large amount of data
  • You are using Merge Join

Some recommendations:

  • Try using a staging table instead of reading and writing from the same table since you are reading, writing, deleting, updating from the same destination table.
  • Use partitioning in the destination table which allows to delete and update records from a specific partition instead of the entire table
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!