tsilenzio Posted August 1, 2007 Share Posted August 1, 2007 What is better to use if you plan on having about 10 looong numbers per row per entry in a table and on average theres about anywhere from 800 - 3000 values changeing every couple of seconds. Would it be better for space and / or perfermance to use a BIGINT or a CHAR? Quote Link to comment Share on other sites More sharing options...
tsilenzio Posted August 1, 2007 Author Share Posted August 1, 2007 If anyone finds this confusing at all please let me know halting my project till i can get an answer =/ Quote Link to comment Share on other sites More sharing options...
fenway Posted August 1, 2007 Share Posted August 1, 2007 NEVER store numbers as CHARs. Quote Link to comment Share on other sites More sharing options...
tsilenzio Posted August 2, 2007 Author Share Posted August 2, 2007 oh okay ty! Quote Link to comment Share on other sites More sharing options...
clearstatcache Posted August 2, 2007 Share Posted August 2, 2007 of course BIGINT... Quote Link to comment Share on other sites More sharing options...
btherl Posted August 2, 2007 Share Posted August 2, 2007 If bigint is too small, you can use decimal/numeric. All these types have maximum ranges, so you may still need to resort to varchar in extreme cases. The manual clarifies everything (make sure to check for your version of mysql) Quote Link to comment Share on other sites More sharing options...
fenway Posted August 2, 2007 Share Posted August 2, 2007 If bigint is too small, you can use decimal/numeric. All these types have maximum ranges, so you may still need to resort to varchar in extreme cases. The manual clarifies everything (make sure to check for your version of mysql) BIGINT is never too small... esp. unsigned, that's 8 billion. Quote Link to comment Share on other sites More sharing options...
teng84 Posted August 3, 2007 Share Posted August 3, 2007 and try not to use char if the length of the string is not fixed always use var char for that we only tend to use char if we are requiring the input to be at the same length Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.