Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
4 bytes unsigned value
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01083748
Message ID:
01083842
Vues:
9
>>>>I need to record a 4 bytes unsigned value in my table (range 0 - 4,294,967,295). Currently I am using bigint to represent this value but I am wasting around 3 bytes per record (especially considering that a record is 2100 bytes).
>>>>
>>>4 bytes, but it can to be irrelevant because SQL have a 8060 page bound.
>>
>>Could you please elaborate on this?
>>
>
>except for text,image,...
>
>-SQL store rows into a 8k page.
>-a row can allocate 8039-8060 bytes
>-a row it has to be inside a page
>
>then a row with 1612-2009 bytes they will occupy the same space.
>
>but every field indexed uses space on index tree pages,
>and the clustered index use space on every not clustered index
>as bookmark.

Thanks Fabio. A little over my head but meditate on it I will. (I am content with thinking about a RDBMS as a device that gives me the information I want and ofcourse stores it for when I want it).

>
>>>
>>>
>>>>Anywho, do I have any other options than to use bigint? Does MSSQL have an unsigned field type?
>>>
>>>no
>>>
>>>>I know I could use binary(4) but the field is PK so I would like it to be a "visible" type.
>>>
>>>
>>>
>>>>
>>>>Are there any problems using binary(x) as PK?
>>>>
>>>
>>>no, but
>>>how are they created?
>>
>>The 4 bytes value is created by the "widget" manufacturer in China or Mexico (and is said to be unique).
>>
>>>
>>>>I just had a lot of thoughts running through my head while eating lunch.
>>>>
>>>>Einar
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform