When creating data types in a new table in MySQL, is it best to use a much larger data type than I think that I will eventually use (to be safe), or try to get as close to possible (as small as possible)? This is for a very large database.
Thanks!
phranque
5:31 am on Nov 22, 2007 (gmt 0)
there are some types and threshold values for sizes that can affect storage and/or query efficiency. perhaps you would get a more specific answer if you could give some examples.
ZydoSEO
6:58 pm on Nov 24, 2007 (gmt 0)
I'm not that familiar w/ the ins and outs of MySQL. I've worked on SQL*Server for 7 years and Oracle for 12 yrs before that. But in general, I'd suggest making them the size you think you need in the near future. If MySQL is like SQL*Server (or most DBs), you can always ALTER the table definition later to convert the fields to a larger size.
[edited by: ZydoSEO at 6:59 pm (utc) on Nov. 24, 2007]