I have an application which uses a PostgreSQL table. The table is very big (billions of rows) and has a column which is an integer.
integer can be up to 6 digits, i.e. 0-999,999 , no negatives.
I thought about changing it to be
Would this be a good idea? Would
numeric(6,0) take fewer bytes? How about the performance (this table is being queried a lot)?