Subject | Re: [firebird-support] Re: GUID as Primary Key |
---|---|
Author | David Garamond |
Post date | 2004-03-02T16:24:17Z |
Luke Young wrote:
1. do you use index on your "PK" (obviously if it is already a PK, it
uses a unique index)?
2. is your GUID random or does it have a uniform prefix? microsoft now
has a random-number-based GUID so it's completely random and is better
in term of index distribution.
3. search the archives, there are lots of GUID-related threads already.
some people use CHAR(32) (representing the GUID as hexstring), but the
most efficient is CHAR(16) BINARY/OCTETS.
--
dave
> I see from this list that there are those achieving sub one second6 second is very slow.
> queries, what is being used to index these tables and what
> optimisations have to be made to break the 1 second barrier?
1. do you use index on your "PK" (obviously if it is already a PK, it
uses a unique index)?
2. is your GUID random or does it have a uniform prefix? microsoft now
has a random-number-based GUID so it's completely random and is better
in term of index distribution.
3. search the archives, there are lots of GUID-related threads already.
some people use CHAR(32) (representing the GUID as hexstring), but the
most efficient is CHAR(16) BINARY/OCTETS.
--
dave