You don't actually need to be performing a cross join. Cross joins are inherently expensive operations. You shouldn't be doing that unless you really need it. In your case what you really need is just an inner join. You're performing a cross join which is resulting in lots of values that you don't need at all, and then you're filtering out a huge percentage of those values to leave you with the few that you need. If you just did an inner join from the start you would only compute the values that you need. That will save you from needing to create a whole lot of rows you don't need just to have them be thrown away.
LINQ has its own inner join operation, Join
, so you don't even need to write your own:
RunningResult[parameter.Uid] = (from source_row in RunningResult[parameter.Uid]
join target_row in ColumnDataIndex[dest_key]
on GetColumnFromUID(source_row, rel.SourceColumn) equals
GetColumnFromUID(target_row, rel.TargetColumn)
select new Row()
{
Columns = MergeColumns(source_row.Columns, target_row.Columns)
}).ToList();