From: Erland Sommarskog on
Arjen (boah123(a)hotmail.com) writes:
> About my second question / your second answer: I will keep using GUIDs
> (unique identifiers). It was not my intention to distill GUIDs to
> integers... I thought that maybe sql server distill guids to ints when the
> guid is a relationship... in other words, when the relationship "connects"
> to guids sql server will make an index based on ints because that might be
> fast to search in.

Just as would make little sense to you do to so, it would make little
sense to SQL Server.

True, for longer keys, say something which is varchar(30) or even longer,
an engine could use a hashing technique, and store the hash values in
the tables. But such a hashing would have to be relatively collision-free,
and that would call for fairly long hash values. Thus, it would not be
meaningful for a 16-byte value, even less one that can cover the full
range of 2^128 possible values.

Whether there is any product that uses such a hashing in this vein, I
don't know.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx