Quoting the documentation:
The type integer is the common choice, as it offers the best balance between range, storage size, and performance. The smallint type is generally only used if disk space is at a premium. The bigint type should only be used if the range of the integer type is insufficient, because the latter is definitely faster.
My understanding is that different data types require different allocations of memory. So I am assuming, less-space means less seeks required to fetch data (theoretically, at least).I am not sure about reads, writes and computations.
How significant are changes in data types with regards to:
- Storage
- Writing to tables
- Reading from tables
- Performing calculations (eg. adding two columns)