Help to tune the Linq Query for comparing multiple columns which taking 45 mins to execute so kindly help to tune the Query

Description

Iam using 2 datatable and compare 3 not equal columns with 2 table and getting the desired Output but Query taking 45 mins to execute..Kindly help to tune the Query.

DT1 - dt_calero_final_iphone with 180000 records
DT2 - DT_MatchedDelta with 400000 records

QUERY:
(From row In dt_calero_final_iphone.AsEnumerable()
Where Not DT_MatchedDelta.AsEnumerable().Any(Function (r1) r1(“Calero Phone #”).ToString.Trim = row(“Mobile Number”).tostring.Trim) _
AndAlso Not DT_UnMatchedDelta.AsEnumerable().Any(Function (r2) r2(“Calero Phone #”).ToString.trim = row(“Mobile Number”).tostring.Trim)
Select dt_calero_final_iphone.Clone().LoadDataRow({row(“Serial Number -Device”),row(“Mobile Number”),row(“Employee number”)}, False)).CopyToDataTable()

Link

Date

2025-09-13

Related UiPath products

IT Automation
Studio
Studio Web
StudioX

To consume less time you should use VBA with linq.

Cheers

A post was merged into an existing topic: Help to tune the Linq Query for comparing multiple columns which taking 45 mins to execute so kindly help to tune the Query

Duplicate, see above.