Subject | Re: [firebird-support] Indexing non numeric primary keys |
---|---|
Author | Elmar Haneke |
Post date | 2004-08-17T08:56:16Z |
rajsubramani schrieb:
be more key placed on each index page. The difference between string-
and integer- comparisons should not be of eny significance.
This does hold for nearly any DBMS.
On the other hand varchar(36) should also be indexed with good
performance, to get figures on the difference you should run some
benchmarks.
To index the GUID-varchar field you should make shure to use an
single-byte-charset and that there is no collation since both can
significantly enlarge the key-size.
Elmar
> However, after a lot of "google" searches I have yet to understandThe numerical key should be more efficient in theory since there can
> conclusively whether a numeric PK would be more "efficient" to index
> as opposed to a varchar(36) key (particularly when the DB has between
> 100,000 to a millon records to sift through).
be more key placed on each index page. The difference between string-
and integer- comparisons should not be of eny significance.
This does hold for nearly any DBMS.
On the other hand varchar(36) should also be indexed with good
performance, to get figures on the difference you should run some
benchmarks.
To index the GUID-varchar field you should make shure to use an
single-byte-charset and that there is no collation since both can
significantly enlarge the key-size.
Elmar