locked
Narrowing Data Types RRS feed

  • Question

  • User-2060576634 posted

    hi..
    Is it really important to narrow our numeric data-types to tinyint and smallnt instead of int for a low traffic low volume website? does these alterations really affect the size of our database?

    Monday, February 2, 2015 4:41 PM

Answers

  • User-821857111 posted

    No. Not for a low traffic, low volume site. You would have to be storing a serious amount of data for it to become a significant issue. I have seen more problems arising from using smaller datatypes in applications that eventually outgrew them, rather than from using a 4 byte datatype to store 1 or 2 byte values.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 2, 2015 5:23 PM
  • User-821857111 posted

    I might use a tinyint for that, but I wouldn't lose any sleep over someone using an int for it. It would have an insignificant impact on a low volume website.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 3, 2015 3:16 AM

All replies

  • User-821857111 posted

    No. Not for a low traffic, low volume site. You would have to be storing a serious amount of data for it to become a significant issue. I have seen more problems arising from using smaller datatypes in applications that eventually outgrew them, rather than from using a 4 byte datatype to store 1 or 2 byte values.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 2, 2015 5:23 PM
  • User1853794821 posted

    Amen to that!

    Monday, February 2, 2015 5:58 PM
  • User-2060576634 posted

    No. Not for a low traffic, low volume site. You would have to be storing a serious amount of data for it to become a significant issue. I have seen more problems arising from using smaller datatypes in applications that eventually outgrew them, rather than from using a 4 byte datatype to store 1 or 2 byte values.

    thanks a lot.. what about cases in which we are confident about the data type not being exceeded or overloaded? for example a given answer to a multi-choice question is always 1 to 4 and never more. far less than a tinyint. would it be worth taking the challenge? assuming that we have a low volume website but not high on resources either.. would these slight differences have a relatively huge impact on our future database? 

    Tuesday, February 3, 2015 3:01 AM
  • User-821857111 posted

    I might use a tinyint for that, but I wouldn't lose any sleep over someone using an int for it. It would have an insignificant impact on a low volume website.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 3, 2015 3:16 AM