Subject | Re: [firebird-support] Performance Penalty for String Joins? |
---|---|
Author | Helen Borrie |
Post date | 2004-03-08T21:14:39Z |
At 05:21 PM 8/03/2004 +0000, you wrote:
1 - if the barcode comes from an external source, there is a potential
integrity problem in using it as the PK.
2 - you should always use character types for barcodes - ideally CHAR, but
if it's possible you will need to accept different variants at some,
VARCHAR would be better.
/heLen
>I have a field that can be either a bigint or a string. It will hold aNot with the size you are talking about (14 chars?) But, two things:
>UPC bar code. This field will be a primary key for the table. Is there
>any performance penalty for joining on a string field vs a bigint?
1 - if the barcode comes from an external source, there is a potential
integrity problem in using it as the PK.
2 - you should always use character types for barcodes - ideally CHAR, but
if it's possible you will need to accept different variants at some,
VARCHAR would be better.
/heLen