Quote:
|
Originally Posted by Yadrif
Is there any performance difference between using an INTEGER vs. a SMALLINT datatype?
|
Depends on where and how you're using it, of course.
If you need to store or pass numbers larger than 3267, the choice is clear.
If you have to transfer large amounts of small numbers, the choice should also be clear. Even CHAR(1) could be a choice then!
Computationally, there will probably be little or no difference between manipulating INTs or SMALLINTs since registers are always either 4 or 8 bytes nowadays. Or is SMALLINT arithmetic still done in 2-byte registers?