Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Change in execution plan in change in constraint Expand / Collapse
Author
Message
Posted Monday, November 25, 2013 5:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, December 3, 2013 3:29 AM
Points: 2, Visits: 20
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.
Post #1517213
Posted Monday, November 25, 2013 8:56 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 8:52 AM
Points: 300, Visits: 566
Have you updated the statistics on the table lately?

MCITP SQL 2005, MCSA SQL 2012
Post #1517309
Posted Monday, November 25, 2013 12:09 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, July 2, 2014 8:22 AM
Points: 148, Visits: 185
have you checked with profiler...[url=http://borngeek.in][/url]
Post #1517411
Posted Tuesday, November 26, 2013 2:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, December 3, 2013 3:29 AM
Points: 2, Visits: 20
Thanks @RTaylor2208. Updated the statistics and it worked fine.
Post #1517573
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse