Upload
sourabh-agarwal
View
1.614
Download
0
Embed Size (px)
Citation preview
Writing Optimal Queries
Things to Consider
• Using Functions in Queries• Implicit Conversions/Data Type Mismatch• Missing Join Predicates, Missing Column Statistics • Clustered GUID’s• Remember - Row goal issue
Things to Consider contd..
• SQL Anti Patterns• Temp Table vs Table Variable• Avoid using HAVING when its possible to use WHERE• Issues with Multiple Distinct Aggregates.
Introduction
• Sourabh Agarwal• Premier Field Engineer – Microsoft Services• Blogs: www.sqluninterrupted.com• Facebook: www.facebook.com\troubleshootingsql,
www.facebook.com\sqlserverfaq, https://www.facebook.com/groups/SQLBangalore/?ref=bookmarks
• Twitter: @SQLSourabh