For you, the creators of the database / performance gurus are there.
I am developing a table, I have the choice to either use int or nvarchar (128) for the column, assuming space is not a problem. My question is what will give performance
when searching by int column
where ID = 12324
or when I look for the nvarchar column (the key is the whole value, so I do not use the LIKE operator)
where Key = 'my str'
I am sure that for smaller datasets this does not matter, but let it be assumed that this data will be in millions of rows.
performance sql-server database-design
Ray fan
source share