Problem with like operator (time consuming)

  • I have a query to search in a user table say "tableUser", having fileds UserId, UserName....10-12 cols

    If I use filter : where UserName like '%ABCDEF%'  it takes around 10 secs

    If I use filter : where UserName like '%ABCDEFG%'  it takes around 1 sec

    where UserID is a primary key.

     

    Any idea, why its behaving like this?

  • can you please paste execution plan of both queries?  

    Regards
    Shrikant Kulkarni

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply