0

Here I am having a table called Tuser with greater than 100K records as I need to get those records directly with a conditiion

here is my query

SELECT TU.USERID,TU.ORGUNITID,TU.LOGINNAME,TU.LOGINPASSWORD,TU.FIRSTNAME,TU.LASTNAME,      
  TU.HINTQUESTION,TU.HINTANSWER,TU.CONTACTID,TU.STATUSTYPE FROM TUSER(NOLOCK) TU       
  INNER JOIN TUSERORGUNIT(NOLOCK) TUO ON TUO.USERID = TU.USERID      
  WHERE TU.ORGUNITID = @ORGUNITID

it is taking 4 to 5 sec when there are lessa than 3k records

now its taking on an average 35sec to execute.

This is my Execution plan

enter image description here

Do I need to create any index? and why? can u explain?

Surendra
  • 41
  • 5

0 Answers0