Is there a performance difference by using an Integer key instead of say a Char(4), Smallint or Tinyint? I'm wondering if Integers have any other performance value other than the compressed 4 bytes of space they take up.
For instance... will a join perform any better with an Integer key as opposed to a Char(4) key? Will selecting on a value (...WHERE mykey=2) perform better with an Integer?
Also, if you know the value of a key won't exceed 32,000 would it be best to simply make the key a Smallint rather than an Integer?
Thanks.
For instance... will a join perform any better with an Integer key as opposed to a Char(4) key? Will selecting on a value (...WHERE mykey=2) perform better with an Integer?
Also, if you know the value of a key won't exceed 32,000 would it be best to simply make the key a Smallint rather than an Integer?
Thanks.