Julien Cheyssial's Blog

It's all about a nice UI

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

Books I'm reading

My Articles

Subscriptions

Post Categories



MSSQL NText/NVarChar Fields for very long text

Finally, I found some time to work on MyBlogroll and today, I worked on it all day long !

For many different reasons, I decided to store feeds content into a MS SQL Database. But I immediately ran into a problem ! My problem was that some posts were extremely long (> 5000 characters) and I was storing the post body/description into a NVarChar field which is 8000 byte long but limited to 4000 chars since it stores each characters on 2 bytes (I'm not sure of that, just tell me if I'm wrong). So, I decided to switch the Description field type to NText (I looked at .Text database for that). It now works perfectly since post body isn't truncated anymore.

What I'd like to know now is : What are the cons and counter performances about using NText fields (if there are any) ?

posted on Friday, December 05, 2003 2:47 PM by jcheyssial





Powered by Dot Net Junkies, by Telligent Systems