Here's what the SQL server 2000 BOL says about uniqueidentifier


============================The main advantage of the uniqueidentifier data type is 
that the values 
generated by the Transact-SQL NEWID function or the application GUID 
functions are guaranteed to be unique throughout the world.

The uniqueidentifier data type has several disadvantages:
�       The values are long and obscure. This makes them difficult for 
users to type correctly, and more difficult for users to remember.

�       The values are random and cannot accept any patterns that may make 
them more meaningful to users.

�       There is no way to determine the sequence in which uniqueidentifier 
values were generated. They are not suited for existing applications that 
depend on incrementing key values serially.

�       At 16 bytes, the uniqueidentifier data type is relatively large 
compared to other data types such as 4-byte integers. This means indexes 
built using uniqueidentifier keys may be relatively slower than 
implementing the indexes using an int key.


Consider using the IDENTITY property when global uniqueness is not 
necessary, or when having a serially incrementing key is desirable.

============================

Tom Nunamaker
[EMAIL PROTECTED]
Macromedia Certified ColdFusion Developer


At 10:44 PM 6/1/01, you wrote:
>Don't remember exactly. I found it by doing a search in the "Online books".
>I was trying to make a column an autonumber but I realized it was no longer
>in the list. In the documentation it said this method had changed in SQL2k
>and that now you set the column to an INT and then mark YES to increment at
>the bottom. Then it went on to say the preferred method was UUID blah
>blah...
>
>Sorry I don't have more detail...it was a while back.  :\
>
>
>-----Original Message-----
>From: Ross Keatinge [mailto:[EMAIL PROTECTED]]
>Sent: Friday, June 01, 2001 3:18 PM
>To: Fusebox
>Subject: RE: max_id or autonumber?
>
>
>Stacy, do you have any reference to where MS recommends against
>identities? I'd be interested to read about it.
>
>Am I correct to assume that CreateUUID calls a Windows API call to get
>the string and is not something cooked up by Allaire?
>
>A slightly OT caution that might be appropriate here:
>If you do use integers for PKs and have URLs like
>
>http://mydomain.com/getdata.cfm?id=123
>
>which then creates a query SELECT Fields FROM TABLE WHERE id = #url.id#
>type of thing then be careful of the security issue with SQL Server and
>maybe others where you can put a semicolon and then another SQL
>statement. Make sure url.id is a number (VAL is useful here).
>
>Ross
>
>
>--- Stacy Young <[EMAIL PROTECTED]> wrote:
> >
> > I can tell you they do in SQL2K. They advise against it. Suggest
> > UUID.
> >
> >
> > -----Original Message-----
> > From: Paul Smith [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 31, 2001 8:52 PM
> > To: Fusebox
> > Subject: Re: max_id or autonumber?
> >
> >
> > Are you saying:
> >
> > Microsoft recommends you not use the identity feature?
> >
> > best,  paul
> >
> > At 10:23 AM 5/31/01 -0700, you wrote:
> > >Microsoft
> > >doesn't even recommend that you use the identity feature for a
> > Unique
> > >ID field because of this.
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to