Guest Posted April 11, 2008 Share Posted April 11, 2008 I have a database of millions of 11 digit and 12 digit number its just numbers no other characters spcae and performance are very very big issues. I want find out the best storage type to hold them but I cant quite figure it out. I have been using Cheat Sheet to tell how many digits the variables hold http://www.ilovejackdaniels.com/mysql_cheat_sheet.png and this to tell me how much space each type takes up http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html I think that a float will require the least amount of space but am not sure. Can someone tell me for sure what the best variable is in explanation please. Quote Link to comment Share on other sites More sharing options...
aschk Posted April 11, 2008 Share Posted April 11, 2008 If you're just storing large integers use BIGINT, there's no need to store it in any other format. If you ARE only storing integers then you don't need precision therefore DOUBLE/FLOAT shouldn't even feature as options. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2008 Share Posted April 11, 2008 I was thinking that but on mysql.com it says that a ig int is 8 bytes and floats are only 4 thats why I have floats but im not sure if thats the way it works and want some kind of explanation as to why something is the smallest. Quote Link to comment Share on other sites More sharing options...
fenway Posted April 11, 2008 Share Posted April 11, 2008 I was thinking that but on mysql.com it says that a ig int is 8 bytes and floats are only 4 thats why I have floats but im not sure if thats the way it works and want some kind of explanation as to why something is the smallest. You still want BIGINT. 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.