Is there a data type smaller than smallint (16bit)? I need a column with only numbers from 1 to 31 so i think that 5bits are enough and I do not want to waste space with the overhead of 11bit per tuple.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In docs there is no such 1 byte integer so I think the best way is to use small int. If you don’t consider to do any math operations you can also use just varchar(2) (but this is not the best idea).