Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to miminize size of table?
Message
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
00544575
Message ID:
00544824
Views:
14
>>>Hello,
>>>
>>>We have table which size is 6GB. There is one text field, which is biggest
>>>in this table.
>>>We replaced contents of this field
>>>(fieldvalue = SUBSTRING(fieldvalue, 1, 1)) for half of table's records.
>>>But size remains the same! Why?!
>>>
>>>Giedrius
>>
>>If the field is declared as Char(x), the database will contain x characters even if they are empty. If the field is declared VarChar(x), it will contain only the required number of characters (plus some overhead I think to keep the length of the string but I'm no sure of that).
>
>It's field declared as ntext.

NText is already variable. Do you have any blanks, null characters, ...

Maybe you can use a SELECT Len(FieldName) FROM TableX ... to see if there are some strange values.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform