magesh manavalan

magesh manavalan

  • NA
  • 331
  • 507.4k

Query Performance Low while compare two lacks Loan ID

Feb 6 2015 2:44 AM
Dear Guys,

   I have two tables Query Performance Low while compare two lacks Loan ID with two tables
loan_id is nvarchar data type:

  1.

Dear Guys,

   I have two tables Query Performance Low while compare two lacks Loan ID with two tables
loan_id is nvarchar data type:

  1.

IFMR_BS_MCD_MFI_Template_PRM

 As A
    Table A Structure: Unique ID for Loan_ID

         Upload_File_ID int   Client_ID nvarchar(200)  Loan_ID nvarchar(200)


  2. IFMR_BS_REPAY_SCHEDULE_PRM As B

     Table B Structure: Unique ID for Loan_ID


        Upload_File_ID int   Client_ID nvarchar(200)  Loan_ID nvarchar(200)

The bellow query it will take the 3 to 5 minutes while compare above 20 thousand records




Select Loan_ID from IFMR_BS_MCD_MFI_Template_PRM A where Upload_File_ID IN(1,3,5,13,15,59,13) and Loan_ID Not In(Select Loan_ID from IFMR_BS_REPAY_SCHEDULE_PRM where Upload_File_ID IN(2,4,7,9,10,57,3))

How to improve the performence in that query.

Answers (1)