From the course: SQL Server Performance for Developers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
What datatype conversions do to your query performance - SQL Server Tutorial
From the course: SQL Server Performance for Developers
What datatype conversions do to your query performance
- [Instructor] The most important part about data types and performance is making sure you avoid conversions. And what do we mean by conversions? This is where the parameter maybe that your application is supplying to the database and whether it's its where clause or how you're creating dynamic sequel or what you're passing to a stored procedure, does not match what's actually in the database and this can be a number of ways. It can be passing in a number that's actually stored as a text field. It can be passing in a date that's not stored as a date or not using date type on the .NET side. And when this happens, SQL Server has to do what's known as an implicit conversion. And what exactly do we mean by data type conversions? When your application data or when data that's passed into a query just does not match what's in the table SQL Server will either on its own or by you helping it with a command like cast or convert will change the data type to match what's in the table so you can…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.