We are in the process of switching from the C# Guid.NewGuid() random-ish guid generator to the sequential guid algorithm suggested in this post. While this seems to work well for MS SQL Server, I am unsure about the implications for Oracle databases, in which we store guids in a raw(16) field. Does anyone have any insight as to whether this algorithm would be good for creating sequential guids for Oracle as well as for MS SQL Server, or if a different variant should be used.
Thanks!
Using raw(16) seems to be a reasonable data type for GUIDs. The maximum size for the raw datatype is 2000 bytes and is supported in Oracle 9i, 10g and 11.
There is also a sql function for generating GUIDs, it's called SYS_GUID. see documentation here-> http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/functions153.htm
You may be interested in this article -> http://feuerthoughts.blogspot.com/2006/02/watch-out-for-sequential-oracle-guids.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With