Jump to content

Recommended Posts

I am trying to find out what the maximum number of entries in a mysql database would be. I read online at multiple sources saying that there is no limit on the size of the information or the number of entries in the database. However, that is kind of confusing to me as integer fields obviously have a maximum number that they can store. For example in the mysql documentation it states that the maximum value for an unsigned bigint field is 18446744073709551615. In most cases you will have an auto-increment field with an int or bigint type. So wouldnt the maximum number of entries be this value since eventually you could hit that number. If so then what would you do at that point, would you have to delete some data from the table or split the table into now two tables and start the indexes over. I just want some clarification on what you would do if you were say facebook/twitter/google and stored that amount of information and could potentially reach that number.

 

Any help is appreciated.

Link to comment
https://forums.phpfreaks.com/topic/254168-total-storage-size/
Share on other sites

I dont think that really answers my question. I understand the replication process of storing it across multiple servers so that access to the data is faster but it still uses the same id's in all of those tables so the id would still hit the max number at some point.

Link to comment
https://forums.phpfreaks.com/topic/254168-total-storage-size/#findComment-1303105
Share on other sites

At 1000 table entries per second, it would take over 584 million years to reach that value.

 

$secs_per_year = 31556926;
$entries_per_sec = 1000;
$entries_per_year = $secs_per_year * $entries_per_sec;
$max =18446744073709551615;
$yrs = $max / $entries_per_year;
echo $yrs;

Link to comment
https://forums.phpfreaks.com/topic/254168-total-storage-size/#findComment-1303107
Share on other sites

You may have answered your own question, 18,446,744,073,709,551,615 is a big big number. Also I would think facebook and the like would or could have users spread over many tables if needed. Also I would think that all the other tables come into play to keep this auto-increment way down below the maximum number.

Link to comment
https://forums.phpfreaks.com/topic/254168-total-storage-size/#findComment-1303109
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.