Subject | Re: [firebird-support] searching a varchar(100) column |
---|---|
Author | Ann W. Harrison |
Post date | 2005-04-30T18:21:27Z |
Alan McDonald wrote:
however seemingly stable and unique turns out to change or produce
duplicates. However, there's nothing wrong with an index on a string -
even a long one. Index keys have both suffix and prefix compression, so
the trailing blanks are gone and so are the characters at the front that
duplicate the previous key. If you look at the average key length -
(use gstat) you'll find that in most indexes its very small - much
smaller than the fields being indexed.
Regards,
Ann
>I like surrogate primary keys because everything else I try to use -
> too much disk space/DB pages used for the index. you're always better off
> here with a surrogate integer key as PK. Comments?
however seemingly stable and unique turns out to change or produce
duplicates. However, there's nothing wrong with an index on a string -
even a long one. Index keys have both suffix and prefix compression, so
the trailing blanks are gone and so are the characters at the front that
duplicate the previous key. If you look at the average key length -
(use gstat) you'll find that in most indexes its very small - much
smaller than the fields being indexed.
Regards,
Ann