Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to miminize size of table?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
00544575
Message ID:
00544824
Vues:
22
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform