Subject Re: [firebird-support] Re: GEN_UUID performance
Author Thomas Steinmaurer
>> What datatype exactly? Integer, Numeric(18,0) or BigInt?
>>
>> Numeric(18,0) and BigInt is a 64-bit Integer. I doubt you reach the
>> limit. With Integer (a 32-bit Integer) this is another story. I would
>> rather go with a 64-bit Integer instead of a GUID in that scenario.
>
> The PK is 18,0, which I know is 64-bit, but GUID is 128-bit. Unless it is contraindicated, because of performance or something else, I'd rather go bigger. When I said the app is active, I wasn't kidding. In addition to being active, I've had users of the previous version for over 15 years. I know than 900 trillion is big (64-bit), but if one of my customers gets there, it will be without warning. That means I'll have to drop everything an invent a replacement database, and data migration tool. Not something I wish to do while a customer is down, and unable to conduct normal business.

If you aren't in need for having a unique identifier across an entire
system, e.g. for replication, I wouldn't care about GUIDs. IMHO integers
are more easier to read and query in case you want to lookup a record.

Quoting the generator guide:
http://www.firebirdsql.org/manual/generatorguide-basics.html

You can insert 1000 records per second for 300 million years until you
reach the limit of a 64-bit integer.

> My question still stands.

Correct. Although I have no real case performance evidence, I think
integers are more efficient index key storage and query performance wise.



--
With regards,

Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/

Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!