Reply to topic
SQL Server Data Compression
DavePhillips


Joined: 29 Aug 2004
Posts: 2
Location: Tennessee
Reply with quote
Is it possible to compress the data stored in text columns in SQL Server? We send out a lot of letters and we save each copy in our database. We now have four databases that we are using and about to get another one. I'm wondering, since this data isn't access constantly, if there is a way to COMPRESS the data stored in the text column and then use an uncompression utility when the data needs viewing.

I'm wondering if there is something native in SQL to do this, or if there is something that works with Cold Fusion where I can compress the data BEFORE I save it and then uncompress it whenever I need to read it.

Thanks in advance for any input.
kbrocx


Joined: 13 Oct 2004
Posts: 43
Location: Seattle
Reply with quote
By using varChar over text you will save tons of space.
varChar fields expand to hold the amount of data you put in, while char and text fields will always be the maximum size even if there is nothing in them.
varChar in SQL Server 2000 can hold up to 8000 characters, which is a pretty hefty sized letter.
byron
Forum Admin

Joined: 07 Mar 2004
Posts: 160
Location: Newark, DE, USA
Reply with quote
I'm unaware of, but there may be a 3rd party product for SQL to do this, but beware, we don't like installing these on our shared SQL servers.

Other options (never tried this) would be to zip the file (see cflib.org) I think there is a function on there to zip and unzip, using Java. Then save the .zip file to the database. I'm saying stored in an image or text field. If the zip files are small enough you can get away with varbinary or varchar fields. <cfqueryparam type="BLOB" is what you may need to use to store the zip file in the DB if you wind up using a image field.

Not sure if the zip file is a binary or text?

Play around with it and see how it goes.

http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b20.htm#wp1102474
SQL Server Data Compression
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic