Subject | Re: uniqueidentifier data type and performance |
---|---|
Author | martinthrelly |
Post date | 2007-03-27T10:30:54Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...>
wrote:
thanks for your reply.
ive got a demo working using the OCTETS character set. my demo is
using C# to generate the GUIDS before i perform an insert. the
alternative is for me to use a UDF to generate the GUIDS from within
Firebird itself. but i really dont see the point of this as its so
simple to do with C#.NET. is there any reason it might be better for
me to go down the UDF route?
thanks.
wrote:
>as
> At 07:09 PM 25/03/2007, you wrote:
> >ive done a search on the threads and read something about storing
> >binary octets. there was a bit of a debate.(dec code 0).
> >
> >is there any resource i can go to which will give me a definitive
> >answer to how to tackle this common scenario in firebird? thanks
>
> It's not all that common a scenario in Firebird, not sufficiently
> common to warrant a manual on the subject, at least! :-) Most
> common way to do keys for replictation is to use two sequence keys
> (a.k.a. generators) or to use one sequence and allocate ranges to
> different sites. GUIDs are not guaranteed to be unique; sequences
> are. There's no reason to suppose there would be a perceptible
> difference in performance either way.
>
> But, if you're forced to use a GUID, use a CHAR type and character
> set OCTETS for the column. That way you don't get stuck with blank
> bytes trailing.......OCTETS stores trailing bytes as ascii null
>hello helen
> ./heLen
>
thanks for your reply.
ive got a demo working using the OCTETS character set. my demo is
using C# to generate the GUIDS before i perform an insert. the
alternative is for me to use a UDF to generate the GUIDS from within
Firebird itself. but i really dont see the point of this as its so
simple to do with C#.NET. is there any reason it might be better for
me to go down the UDF route?
thanks.