How important is it to select the smallest possible data type when designing a database?

database-design, mysql

Solution

On an Indexed field with a significantly large table the size of your field can make a large affect on performance. On a nonindexed field its not nearly as important bit it still has to write the extra data.

That said, the downtime of a resize of a large table can be several minutes or several hours even, so don't make them smaller than you'd imagine ever needing.

Problem

How much of a difference does using `tinyint` or `smallint` (when applicable) instead of just `int` do? Or restricting a `char` field to the minimum characters needed? Do these choices affect performance or just allocated space?

Original source