Subject | Re: [firebird-support] Effect of GUID in primary key on v 1.5 vs 2.5 |
---|---|
Author | Thomas Steinmaurer |
Post date | 2012-03-06T20:52:47Z |
> Looking at creating a new database in a Win32 server that is expected to grow quite large and trying to decide whether to use GUIDs or BIGINT for the primary key. Will likely be using SuperServer architecture.In a test scenario, I had a mixed feeling about using GUIDs. They are
>
> Besides hosting local data at each server, some or all of the data in the new database may need to periodically be sent to a group or corporate server for further analysis and reports so GUIDs look attractive.
>
> Any significant difference in performance on GUIDs as primary keys in versions 1.5.6 and 2.5?
>
> Any significant difference in performance on GUIDs as primary keys in versions 2.5?
>
> Where can I find out more about whether it matters a lot if GUIDs are used as primary keys instead of the normal BIGINT sequences by generators?
>
> Which would be better?
longer than BIGINT and the random values, when used in an indexed column
like a PK constraint, makes bulk operations slower than using integer.
At least this was my result quite some time ago.
What I also don't like about GUID is, if you don't have additional
fields storing the "source" of the record, you aren't able to tell from
what location/server the record has been added. When using a BIGINT feed
by a generator, you can set a starting value per site/server and that
way, you somehow "know" the source of insertion when merging the
satellite databases with a central database.
--
With regards,
Thomas Steinmaurer (^TS^)
Firebird Technology Evangelist
http://www.upscene.com/
http://www.firebirdsql.org/en/firebird-foundation/