Subject | Re: [firebird-support] uniqueidentifier data type and performance |
---|---|
Author | Milan Babuskov |
Post date | 2007-03-28T18:16:43Z |
martinthrelly wrote:
and the other field filled with sequential numbers (or characters) by
generator.
If two fields are too much, you can use a single field and partition the
space:
server one uses interval: 0 - 1.000.000.000
server two uses interval: 1.000.000.000 - 2.000.000.000
etc.
I used one bilion here, but you can have much bigger segments (64bit
integer is a very large number).
I find 64bit integers much easier to control and maintain than GUIDs.
Main benefits are:
a) it is built into server via GENERATORs - no need for external stuff
b) you can easily tell where the data is coming from
c) you have an actual sequence 1, 2, 3, 4... so it's easy to see gaps
and other problems that might occur
I also believe that indexes are smaller/faster, but I don't know that
much of internals to be 100% sure.
--
Milan Babuskov
http://www.guacosoft.com
http://www.flamerobin.org
> hello there. we are considering porting a project to Firebird 2.0. theCreate a two-field identifier: one field for the SITE_ID (or server id)
> only stumbling block for us is regarding the uniqueidentifier data type.
and the other field filled with sequential numbers (or characters) by
generator.
If two fields are too much, you can use a single field and partition the
space:
server one uses interval: 0 - 1.000.000.000
server two uses interval: 1.000.000.000 - 2.000.000.000
etc.
I used one bilion here, but you can have much bigger segments (64bit
integer is a very large number).
I find 64bit integers much easier to control and maintain than GUIDs.
Main benefits are:
a) it is built into server via GENERATORs - no need for external stuff
b) you can easily tell where the data is coming from
c) you have an actual sequence 1, 2, 3, 4... so it's easy to see gaps
and other problems that might occur
I also believe that indexes are smaller/faster, but I don't know that
much of internals to be 100% sure.
--
Milan Babuskov
http://www.guacosoft.com
http://www.flamerobin.org