Subject | AW: Performance comparision for primary keys - int vs. varchar |
---|---|
Author | Köditz, Martin |
Post date | 2015-10-02T21:09:12Z |
Hi,
I’m using integer IDs for primary keys in my tables. What if I would use varchar fields instead? Will I lose performance in that case, especially for big tables? Will joins still work as fast as they do for the integer column.
In my case I have a table TBL_BANK (
BANK_ID int,
BIC varchar(11),
…
)
So what will happen if I switch the PK to BIC in that case? I would change the FKs to BIC too. I don’t know how the index keys are build and stored in firebird. So I cannot say this way is faster than the other one. But maybe someone else can do.
Regards
Martin