Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL brain freeze
Message
 
 
To
23/02/2017 13:35:11
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01648427
Message ID:
01648431
Views:
40
>>Since scalar functions don't play well in SQL Server, I suggest to incorporate it into your main query using OUTER APPLY, then you would be able to use ISNULL function to get the 'Unknown Store'
>
>This worked.
>However, the response was still slow.
>The store table had a non-clustered index on the storecode column.
>I changed it to a clustered index and it flies now.
>Why is there such a difference in performance between the two types on index?

Is storecode is a good candidate for such index? What kind of entries do you have?

Compare the execution plans between the 2 queries. The clustered index seek is the best for the query execution.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform