Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Generating BigInt identity
Mon, Nov 3 2008 7:58 AMPermanent Link

Leslie
Tim,

How can  a  BigInt identity  value be generated for a field? ( I have made a table to hold
the value and a stored procedure to return the incremented value in a Out paramater, but I
got 'user definied function is not allowed error when tried to use the procedue in the
'generate expression' memo of EDBManager.) More precisely I need a database wide Bigint
identity which can be used in any table.

Regards,
Leslie
Mon, Nov 3 2008 12:27 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Leslie,

<< How can  a  BigInt identity  value be generated for a field? ( I have
made a table to hold the value and a stored procedure to return the
incremented value in a Out paramater, but I got 'user definied function is
not allowed error when tried to use the procedue in the 'generate
expression' memo of EDBManager.) More precisely I need a database wide
Bigint identity which can be used in any table. >>

EDB does not support BigInt identity columns.  Why do you need a BigInt
identity column ?  Even a normal Integer identity column will take a very
long time to consume the available range of numbers.  If you added 10,000
rows a day, it would still take 588 years to consume all of the numbers.
For 100,000 rows a day, it would take 58 years to do so.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Nov 3 2008 4:54 PMPermanent Link

Leslie
Tim,

<< Why do you need a BigInt identity column ? >>

Transaction loging. I cannot explain it in details, but it is needed for my implementation
of replication and other things as well. (Multiversion concurrency control which allows
multiply transactions without writelocks until the transaction is finished,  automatic
database recovery...)

The data size is only half of the issue. Database wide (or even Engine  wide) availability
of such generator is the other half. I have given
up handling this on the engine level, I am going to implement most of it on the component
level in the client applications. It is doable, though  pobably more errorprone,
especially  with  multithreading.

Thank you for your answer,
Leslie
Tue, Nov 4 2008 12:49 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>EDB does not support BigInt identity columns. Why do you need a BigInt
>identity column ? Even a normal Integer identity column will take a very
>long time to consume the available range of numbers. If you added 10,000
>rows a day, it would still take 588 years to consume all of the numbers.
>For 100,000 rows a day, it would take 58 years to do so.

That's the sort of logic that meant years were only stored using two digits - think of those poor unborn programmers who will suffer because of this <vbg>

Roy Lambert
Tue, Nov 4 2008 4:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< That's the sort of logic that meant years were only stored using two
digits - think of those poor unborn programmers who will suffer because of
this <vbg> >>

Yeah, I'll think about them a lot when I'm six feet under. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image