In this video, I delve into a fascinating issue surrounding date and datetime2 data types in SQL Server, particularly focusing on how changes in database compatibility levels can lead to unexpected results. I explain why you should avoid mixing these data types due to significant behavior differences introduced around 2016. The video features demonstrations based on work by Martin Smith and Paul White, who originally uncovered this issue. I also discuss the importance of recognizing and addressing this problem, especially for those using ORMs or working with date/time data in SQL Server queries. If you're interested in learning more about SQL Server performance tuning or need expert consulting, my channel offers affordable memberships and training options to help you improve your skills.
CHAPTERS
00:00:00 - Introduction
00:00:29 - Compatibility Level Change
00:01:29 - Free Content Options
00:03:42 - ORM Issue Discovery
00:04:43 - Martin Smith's Answer
00:05:36 - Paul White's Article
00:07:15 - Compatibility Level 140
00:08:29 - Index Impact
00:09:26 - Read Their Stuff
00:10:29 - Conclusion
━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 TRAINING & COURSES
━━━━━━━━━━━━━━━━━━━━━━━━━━
Get AI-Ready With Erik
https://training.erikdarling.com/get-...
SQL Server Performance Engineering Course
https://training.erikdarling.com/sql-...
Learn T-SQL with Erik
https://training.erikdarling.com/lear...
Everything Bundle:
https://training.erikdarling.com/?cou...
━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ CONSULTING & SERVICES
━━━━━━━━━━━━━━━━━━━━━━━━━━
Need SQL Server performance help?
https://training.erikdarling.com/sqlc...
━━━━━━━━━━━━━━━━━━━━━━━━━━
💬 CONNECT
━━━━━━━━━━━━━━━━━━━━━━━━━━
Ask questions at Office Hours
https://erikdarling.com/officehours/
Become a channel member
/ @erikdarlingdata
━━━━━━━━━━━━━━━━━━━━━━━━━━