database size

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

I cannot understand the database sizes as created with SQL CE 2.0. I have a
table with the main field defined as type "NTEXT". I import numerous rows
of data which derives from 34mb of text, yet the resulting database is 75mb
in size? I can see the database being a little bit larger, but more than 2
times!!! What's up with that? Data compression would be really nice, but
data expansion ... ;-) Compacting it makes no difference. Any ideas?
 
Rick,

Is your text file in UTF8/ASCII? If so, this is perfectly normal.

Here's a quote from SQL CE documentation which would explain it:

ntext
Variable-length Unicode data with a maximum length of (2^30 - 2) / 2
(536,870,911) characters.
Storage size, in bytes, is two times the number of characters entered.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Hi Rick:
Rick said:
I cannot understand the database sizes as created with SQL CE 2.0. I have a
table with the main field defined as type "NTEXT". I import numerous rows
of data which derives from 34mb of text, yet the resulting database is 75mb
in size? I can see the database being a little bit larger, but more than 2
times!!! What's up with that? Data compression would be really nice, but
data expansion ... ;-) Compacting it makes no difference. Any ideas?

I'm not 100% but on full Sql Server, NVARCHAR and NText both use twice the
size of the characters entered to store the data. This is b/c of conformity
with the unicode character set. Anyway, I'm not positive but I'd bet the
it's the same issue with SQL CE (two bytes of storage for each character
entered)'s NText type.
 
Back
Top