Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

newid() question

3 posts in General Discussion Last posting was on 2010-10-21 01:43:44.0Z
Harry Posted on 2010-10-20 03:43:08.0Z
From: "Harry" <nospam.harrylhy@gmail.com>
Newsgroups: sybase.public.ase.general
Subject: newid() question
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="big5"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4cbe654c$1@forums-1-dub>
Date: 19 Oct 2010 20:43:08 -0700
X-Trace: forums-1-dub 1287546188 10.22.241.152 (19 Oct 2010 20:43:08 -0700)
X-Original-Trace: 19 Oct 2010 20:43:08 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29656
Article PK: 78884

Hi all

Does anyone know the algorithm of newid()? Does it contains date & time value even milliseconds? And what are the
advantages/disadvantages if I use this for unique key or primary key column for some tables if these tables contains over million
records?




Thanks for advice :)


Rob V [ Sybase ] Posted on 2010-10-20 09:02:04.0Z
From: "Rob V [ Sybase ]" <robv@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: robv@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: newid() question
References: <4cbe654c$1@forums-1-dub>
In-Reply-To: <4cbe654c$1@forums-1-dub>
Content-Type: text/plain; charset=Big5
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4cbeb00c@forums-1-dub>
Date: 20 Oct 2010 02:02:04 -0700
X-Trace: forums-1-dub 1287565324 10.22.241.152 (20 Oct 2010 02:02:04 -0700)
X-Original-Trace: 20 Oct 2010 02:02:04 -0700, vip152.sybase.com
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29657
Article PK: 78885


On 20-Oct-2010 05:43, Harry wrote:
> Hi all
>
> Does anyone know the algorithm of newid()? Does it contains date &
> time value even milliseconds? And what are the
> advantages/disadvantages if I use this for unique key or primary key
> column for some tables if these tables contains over million records?
>
>
>
>
> Thanks for advice :)

newid() generates GUID/UUID values as defined in the corresponding IETF
standard
(http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt).
Basically, the only guarantee you have is that the algorithm will never
generate the same value. You should not make assumptions about
variability in, say, the start of end of the generated values.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Harry Posted on 2010-10-21 01:43:44.0Z
From: "Harry" <nospam.harrylhy@gmail.com>
Newsgroups: sybase.public.ase.general
References: <4cbe654c$1@forums-1-dub> <4cbeb00c@forums-1-dub>
In-Reply-To: <4cbeb00c@forums-1-dub>
Subject: Re: newid() question
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="big5"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4cbf9ad0$1@forums-1-dub>
Date: 20 Oct 2010 18:43:44 -0700
X-Trace: forums-1-dub 1287625424 10.22.241.152 (20 Oct 2010 18:43:44 -0700)
X-Original-Trace: 20 Oct 2010 18:43:44 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29658
Article PK: 78887

Thanks Rob, I will check this document first.



"Rob V [ Sybase ]" <robv@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY> 礎b繞l瞼籀簣i繞K瞻繙簧e瞼D礎簧 4cbeb00c@forums-1-dub 瞻瞻翹繞翹g...

> On 20-Oct-2010 05:43, Harry wrote:
>> Hi all
>>
>> Does anyone know the algorithm of newid()? Does it contains date &
>> time value even milliseconds? And what are the
>> advantages/disadvantages if I use this for unique key or primary key
>> column for some tables if these tables contains over million records?
>>
>>
>>
>>
>> Thanks for advice :)
> newid() generates GUID/UUID values as defined in the corresponding IETF
> standard
> (http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt).
> Basically, the only guarantee you have is that the algorithm will never
> generate the same value. You should not make assumptions about
> variability in, say, the start of end of the generated values.
>
> HTH,
>
> Rob V.
> -----------------------------------------------------------------
> Rob Verschoor
>
> Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
> and Replication Server 15.0.1/12.5 // TeamSybase
>
> Author of Sybase books (order online at www.sypron.nl/shop):
> "Tips, Tricks & Recipes for Sybase ASE" (ASE 15 edition)
> "The Complete Sybase ASE Quick Reference Guide"
> "The Complete Sybase Replication Server Quick Reference Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
> Sypron B.V., The Netherlands | Chamber of Commerce 27138666
> -----------------------------------------------------------------
>