2

我正在运行大约 10 个任务的迁移。每个任务大约需要 5 分钟来处理 50k-100k 记录并将它们迁移到 salesforce。特别是一项任务比其他任务需要更长的时间来处理。

此任务是将数据迁移到只有 5 个自定义字段的简单自定义对象。唯一的区别是此目标对象启用了记录类型,而其他目标对象没有。

记录类型会影响性能吗?

来自 ole db 源的 SQL。此查询需要 1 秒来执行和检索 55k 行

SELECT 
    rh.RevisionHardwareID AS 'Machine_Information_Id__c',
    COALESCE(lmi.Name, lmz.Name) as 'License_Method__c',
    rhd.Servers AS 'Servers__c',
    rhd.Managers AS 'Managers__c',
    COALESCE(rhd.LicenseCount, rhs.CPUCount, rhz.MIPS, rhi.CPW) AS 'Quantity__c',
    CASE
        WHEN rhd.RevisionHardwareID IS NOT NULL THEN '0122J00000023maQAA'
        WHEN rhi.RevisionHardwareID IS NOT NULL THEN '0122J00000023mcQAA'
        WHEN rhz.RevisionHardwareID IS NOT NULL THEN '0122J00000023mdQAA'
        WHEN rhs.RevisionHardwareID IS NOT NULL THEN '0122J00000023mbQAA'
    END AS 'RecordTypeId'
FROM RevisionHardware rh
LEFT JOIN RevisionHardware_Desktop rhd ON rhd.RevisionHardwareID = rh.RevisionHardwareID
LEFT JOIN RevisionHardware_iSeries rhi ON rhi.RevisionHardwareID = rh.RevisionHardwareID
LEFT JOIN RevisionHardware_zSeries rhz ON rhz.RevisionHardwareID = rh.RevisionHardwareID
LEFT JOIN RevisionHardware_Server rhs ON rhs.RevisionHardwareID = rh.RevisionHardwareID
LEFT JOIN LicenseMethod lmi ON lmi.LicenseMethodID = rhi.LicenseMethod_ISeriesID
LEFT JOIN LicenseMethod lmz ON lmz.LicenseMethodID = rhz.LicenseMethod_ZSeriesID
WHERE CASE
        WHEN rhd.RevisionHardwareID IS NOT NULL THEN 'Desktop'
        WHEN rhi.RevisionHardwareID IS NOT NULL THEN 'iSeries'
        WHEN rhz.RevisionHardwareID IS NOT NULL THEN 'zSeries'
        WHEN rhs.RevisionHardwareID IS NOT NULL THEN 'Server'
    END IS NOT NULL

目标对象: 在此处输入图像描述

4

1 回答 1

1

我通过删除目标对象的所有记录类型进行了测试,性能提高了 10 倍。

于 2019-07-16T18:17:56.170 回答