I am working on a project where I constantly insert rows in a table and within a few days this table is going to be very big and I came up with a question and can’t find the answer:
what is going to happen when I’ll have more rows than ‘bigint’ in that table knowing that
I have an ‘id’ column (which is an int)? Does my database (MySQL) can handle that properly? How does big companies handle that kind of problems and joins on big tables?
I don’t know if there are short answers to that kind of problems but any lead to solve my question would be welcome!
numeric data type
If this column is primary key, you are not able to insert more rows.
If not a primary key, the column is truncated to the maximum value it can presented in that data type.
You should change
idcolumn to bigint as well if you require to perform join.You can use uuid to replace integer primary key (for big companies),
take note that uuiq is string, and your field will not longer in numeric