Change in execution plan in change in constraint

  • I am running following query

    SELECT field1, field2, field3, field4, field5

    FROM vwSomeView WHERE Field1 LIKE 'ABC006%' ---- Taking 41 sec This is using Index scan

    SELECT field1, field2, field3, field4, field5

    FROM vwSomeView WHERE Field1 LIKE 'ABC%' ---- Taking 5 sec This is using index seek

    I have also tried to find missing indexs but sql doesn't show any missing index. Please let me know is i am missing some thing.

    Thanks in advance.

  • Have you updated the statistics on the table lately?

    MCITP SQL 2005, MCSA SQL 2012

  • have you checked with profiler...

  • Thanks @RTaylor2208. Updated the statistics and it worked fine.

Viewing 4 posts - 1 through 3 (of 3 total)

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