Disk space is cheap. Database schema changes are not. Updates require testing as well as validation in all of the UI and UX environments.
Indexes of int are easy and great. Indexes of Char, VarChar, or NVarChar are necessary. How the rdbms does such, and how the dba defines the index to accept insert as well as an update is where the true performance lies.
On Sat, Oct 28, 2017 at 8:45 AM, Ed Leafe ed@leafe.com wrote:
On Oct 27, 2017, at 11:48 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
The OCD part of me wants to define the smallest type possible, whereas
the "let's set it and never worry about it" part of me says "just make everything INT."
It's not just the size of the column in the row stored on the disk; it's the size of any index it's part of, and the size of the memory footprint for the column when filtering, sorting, etc. Generally I don't obsess trying to make it as small as possible, but neither do I just make everything huge so that I don't have to worry about it. Use the sanest size (that's based on your experience being a DBA), and if worse comes to worse, there's always ALTER TABLE. :)
-- Ed Leafe
--- StripMime Report -- processed MIME parts --- multipart/signed text/plain (text body -- kept) application/pgp-signature
[excessive quoting removed by server]