What are the main performance differences between varchar and nvarchar SQL Server data types? What are the main performance differences between varchar and nvarchar SQL Server data types? sql-server sql-server

What are the main performance differences between varchar and nvarchar SQL Server data types?


Disk space is not the issue... but memory and performance will be.Double the page reads, double index size, strange LIKE and = constant behaviour etc

Do you need to store Chinese etc script? Yes or no...

And from MS BOL "Storage and Performance Effects of Unicode"

Edit:

Recent SO question highlighting how bad nvarchar performance can be...

SQL Server uses high CPU when searching inside nvarchar strings


Always use nvarchar.

You may never need the double-byte characters for most applications. However, if you need to support double-byte languages and you only have single-byte support in your database schema it's really expensive to go back and modify throughout your application.

The cost of migrating one application from varchar to nvarchar will be much more than the little bit of extra disk space you'll use in most applications.


Be consistent! JOIN-ing a VARCHAR to NVARCHAR has a big performance hit.