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 … Read more

nvarchar concatenation / index / nvarchar(max) inexplicable behavior

TLDR; This is not a documented/supported approach for concatenating strings across rows. It sometimes works but also sometimes fails as it depends what execution plan you get. Instead use one of the following guaranteed approaches SQL Server 2017+ SELECT @a = STRING_AGG([msg], ”) WITHIN GROUP (ORDER BY [priority] ASC) FROM bla where autofix = 0 … Read more