| Author |
Topic |
|
Jon G
Starting Member
31 Posts |
Posted - 2008-06-01 : 10:26:21
|
| Application is ocr'ing tiff image files and then storing the resultant text data in a text field in SQL 2005 database. This field is then used with the full text catalog.All works fine,However, am I using the correct field type to store the text files for efficiency and space saving?If I use a binary field, does this reduce the size of the database by compressing the text data in the binary field? Also, is there a limit as to the size of text file that I could store in a binary field?It would be good to get feedback on this before I go too far down the wrong road.So, text field to store the text data or binary field to store the actual text file? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-02 : 04:12:25
|
VARCHAR(MAX) E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Jon G
Starting Member
31 Posts |
Posted - 2008-06-02 : 05:19:34
|
| Thanks for you reply.what is the difference between varchar(max) and a text field? Why is varchar(max) more efficient than a text field? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-02 : 05:24:05
|
It's not.But you can use standard functions to manipulate the content. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Jon G
Starting Member
31 Posts |
Posted - 2008-06-02 : 05:28:38
|
| If I were to store the actual text file in a binary field instead, would that be more efficient in terms of minimizing the storage space required?thanks again |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-02 : 05:33:49
|
No, it doesn't matter if you use IMAGE or BINARY. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Jon G
Starting Member
31 Posts |
Posted - 2008-06-02 : 05:56:34
|
| so, just to recap. In terms of storage space, it doesn't matter if I use a text field, a varchar(max) field, and image field or a binary field, they will all take up the same amount of space...none of them compress the data? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-02 : 06:57:06
|
Not until SQL Server 2008. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Jon G
Starting Member
31 Posts |
Posted - 2008-06-02 : 07:41:21
|
| That's interesting. So SQL server 2008 has the ability to compress data ? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-02 : 08:09:11
|
Yes. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Jon G
Starting Member
31 Posts |
Posted - 2008-06-02 : 08:31:19
|
| Does that apply to all field types or just certain types? In other words, should I choose a particular field type now to be ready for 2008? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-02 : 09:04:24
|
http://blogs.msdn.com/sqlserverstorageengine/archive/2007/11/12/types-of-data-compression-in-sql-server-2008.aspx E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Jon G
Starting Member
31 Posts |
Posted - 2008-06-02 : 09:11:31
|
| many thanks |
 |
|
|
|