Subject | Re: [firebird-support] Benefit from Sequential Insert of High/Low PK |
---|---|
Author | Lester Caine |
Post date | 2013-01-26T06:05:45Z |
Jeff wrote:
The article is not particularly clear on what problem is trying to be solved?
All it is doing is adding a 'timestamp' to the primary key so that the ordering
is based on when a record was added. GUID's come into their own when you are
combining data from several sources and each provides it's own PK for that data.
Something that could equally be done by having a field for 'source' in addition
to a simple sequential key created by each ... along with an 'added' timestamp
if that is important. At least then you can filter the data by source or time
period, something that is difficult if it's encoded into the GUID? If you only
have one source then you just use a generator for the PK ... any ORDERING of
data is then provided by indexing the data.
So what are you trying to do actually ;)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
> I based this question on this article:I'd expand on Helen's comment ...
> http://www.codeproject.com/Articles/388157/GUIDs-as-fast-primary-keys-under-multiple-database
The article is not particularly clear on what problem is trying to be solved?
All it is doing is adding a 'timestamp' to the primary key so that the ordering
is based on when a record was added. GUID's come into their own when you are
combining data from several sources and each provides it's own PK for that data.
Something that could equally be done by having a field for 'source' in addition
to a simple sequential key created by each ... along with an 'added' timestamp
if that is important. At least then you can filter the data by source or time
period, something that is difficult if it's encoded into the GUID? If you only
have one source then you just use a generator for the PK ... any ORDERING of
data is then provided by indexing the data.
So what are you trying to do actually ;)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk