I have two tables A and B. Both tables have more than 2 lacs records.
Lets say f1 is the field in B, and f1 is varchar field. For each value in f1, we are searching the corresponding record id in A. We have used a scalar function say GetcorrespondingID(B.f1). In Join query we are using condition as GetcorrespondingID(B.f1) = A.RecordID.
After using this function query becomes dam slow. Please advise is there any alternate way?