does it worth switching a PRIMARY KEY from the type NVARCHAR to the type INT?

坚强是说给别人听的谎言 提交于 2019-12-01 18:22:55

I would personally recommend changing COUNTRY_ID from nvarchar(50) to an INT. An int uses 4bytes of data and is usually quicker to JOIN than VARCHAR.

You can also check to see if the space used is reduced by using the stored procedure sp_spaceused

EXEC sp_spaceused 'TableName'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!