id1cc2014-12-24 19:01:11
id1cc, 2014-12-24 19:01:11

A couple of questions about MySQL?

I am interested in several questions regarding mysql.
1) What happens if a/i column id reaches the maximum int?
2) How to avoid it?
3) How will such fullness of the table affect the speed of access?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
SagePtr, 2014-12-24

3. Depending on the indices. If the indexes are correctly composed, the dependence of the speed on the occupancy will be logarithmic, not linear.

FanatPHP, 2014-12-24

1. Mistake.
2. That's when it comes, then ask.
3. Nothing.
Regarding paragraph 2. I strongly recommend that you spend your (and others') time on solving real , not imaginary problems. This way you will save yourself (and others) from doing a lot of unnecessary work and from making a lot of mistakes.

darkfriend, 2014-12-24

2. you can choose the BIGINT type :D
But think about how much BIGINT you need. Usually 2,147,483,647 is enough.
I also doubted at one time what to choose for the id of tables with transaction history. Chose int while enough. Then, if anything, you can change the type to BIGINT

Puma Thailand, 2014-12-24

1) there will be problems with the insert
2) do not use id
3) The speed depends more on queries and not on how many records in the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question