On 10/28/2017 12:48 AM, [email protected] 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."

I like to leave wiggle room generally. But really, using 2, 4, 8, or even 16 bytes is minimal impacts in my experience. So, for example, if you expect the number to never be over a million, I'd probably use Int - which gives up to 2 billion. If you're sure it will never go over 255, I'd still probably go with the 4 byte size.

Maybe you could squeeze that if you know regular maintenance could be done to "reset" values (if feasible). But then, if your system might be integrated with others, ids should usually NEVER be reset.

Whatever the case, please don't do something idiotic like declare "VARCHAR(4000)" for fields that will never have more than 20 characters. That's the most common, stupid, wasteful, inefficient mistake I've seen in so-called "enterprise" apps.

-Charlie



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to