var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: ntext + nvarchar - will this improve performance?
I have a table that contains an ntext column for storing values up to a couple of Mb in size.
However, I estimate that 95% of the values stored in this ntext field will fit into an nvarchar(4000) field.
Is it worth me having both fields in the table?
i.e. For rows where the values < 4000 characters I would store the value in the nvarchar column. Otherwise I would use the ntext column.
Can anyone confirm whether this technique would increase performance given that ntext values are sort of stored separately to the rest of the table data?
A colleague of mine is an Oracle DBA and he mentioned this technique is fairly caommonly adopted in the Oracle world.
You need to check out the 'text in row' table option.
sp_tableoption N'MyTable', 'text in row', 'ON'
When enabled if extended data (like ntext) can be fitted into unused row space it will be, rather than written to seperate paging.