Click here to Skip to main content
15,917,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, when i save rtf information to SQL table i notice that it consumes a lot of space. A text with 1000 symbols normally gets about 2500 symbols in rtf format in database (when I add more formatting, symbols number increase). Do programmers usually save so much information in SQL table and is it normal to have so much?
Will it be wrong if my table gets 10000 characters in it?

Thanks for any replies, I'd really appreciate them!
Posted
Comments
Philippe Mori 12-Jul-11 22:11pm    
For a size of a few kilobytes, it should not matters much provide that you don't load the data uselessly. That is, it you don't need that column when iterating the data or getting one row, then don't load it.

By the way, when images are stored in a databse, they would typically be much bigger that these figures.

I would ask whether the formatting is really data or just formatting for display. If it is for display only, perhaps that should be added in a report when you display the data and only the actual data (text) itself needs to be saved.

But, that depends on your application. If the formatting is what you want to save, you'll either have to save the rtf data or figure another way to save the format information. Personally I don't think I've ever had a case where I wanted all the format info saved.
 
Share this answer
 
It depends on how much records do you predict. If there will be 1000-10000 of such records it shouldn't be a big problem, if millions, then probably it is not very good, but why not? For example Microsoft Sql Express, which is free, supports up to 10 Gb per database, so it supposed to handle big data. Commercial versions are not limited with this value. It looks like it is quite normal.

And you always can decreased used size using compression (System.IO.Compression.DeflateStream and System.IO.Compression.GZipStream) which will help you to store less information. They should compress text (which rtf is) quite good.
 
Share this answer
 
Comments
George Findulov 13-Jul-11 5:52am    
So i guess it's not a problem to have 10000 or 20000 characters in DB. Thanks for your answer!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900