简体   繁体   English

在SQL Server MDS中的叶表中插入非常慢

[英]Insertion in Leaf table in SQL Server MDS is very slow

I am using SSIS to move data from an existing database to an MDS database. 我正在使用SSIS将数据从现有数据库移动到MDS数据库。 I am following the following Control flow; 我正在遵循以下控制流程;

  1. Truncate TableName_Leaf 截断TableName_Leaf
  2. Load Data to stg 将数据加载到stg

The second step has the following data flow: 第二步具有以下数据流:
1. Load data from source database (This has around 90000 records) 1.从源数据库加载数据(大约有90000条记录)
2. Apply a data conversion task to convert string datatype to Unicode (as MDS only supports Unicode) 2.应用数据转换任务以将字符串数据类型转换为Unicode(因为MDS仅支持Unicode)
3. Specify TableName_Leaf as OLE DB destination. 3.指定TableName_Leaf作为OLE DB目标。

The step 1 and 2 are completing quickly, but the insertion to Leaf table is extremely slow. 步骤1和2很快完成,但是到Leaf表的插入非常慢。 (It took 40 seconds to move 100 rows end to end, and around 6 minutes to move 1000 records.) (端到端移动100行花了40秒,移动1000条记录花了大约6分钟。)

I tried deleting extra constraints from the Leaf table, but that also did not improve the performance much. 我尝试从Leaf表中删除额外的约束,但这并没有大大提高性能。

Is there any other way to insert data to MDS which is quicker or better? 还有其他更快或更佳的方法将数据插入MDS吗?

Using a Table or view - fast load. 使用表或视图-快速加载。 in OLE DB destination connection helped resolve the issue. OLE DB目标连接中的帮助有助于解决此问题。 I used a batch size of 1000 for my case and it worked fine. 我为我的箱子使用了1000个批处理大小,并且效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM