Use of nvarchar may badly affect the performance

  • nvarchar columns should not be used unless there is a special need to store multilingual data (other than English)
  • nvarchar columns consume almost double the space compared to varchar columns, leading to increased I/O and consuming unnecessary space in buffer cache.
  • Data types should be defined consistently while using varchar/nvarchar fields as arguments for stored procedures, functions and filter conditions such that they match with data type of the column in respective base table.
  • A simple nvarchar/varchar type mismatch can have a huge performance impact because index seeks will not happen if there is data type mismatch between search variable and actual column in base table.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s