Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: What's the most efficient primary key ?
remco,
Since you have included the comp.database.ms-sqlserver newsgroup in your post, I'll offer a SQL Server specific solution:
SQL Server supports the IDENTITY property, which automatically generates the next value in a arithmetic progression ... with seed and increment values of 1 and 1, the sequence generated is 1, 2, 3, ...
An INTEGER can support values from -2,147,483,648 through 2,147,483,647, thus offering over 4 billion unique values. If that's not enough, SQL Server 2000 has a BIGINT data type that supports values from -9223372036854775808 through 9223372036854775807.
"worldonline" <remco.van.toor_at_iquality.nl> wrote in message
news:9elo7s$sf2$1_at_nereid.worldonline.nl...
> I want to create billions of unique key, wat's the best option?
>
> a compound key containing several integer-columns,
> a large datatype (decimal)
> or a string perhaps ??
>
> i would like the first options, it is good for using OID's
>
>
> thanks in advance,
> remco
>
>
>
Received on Sat Jul 21 2001 - 18:07:04 CDT
![]() |
![]() |