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

A couple of questions about MySQL?

Hey!
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)
S
SagePtr, 2014-12-24
@SagePtr

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

F
FanatPHP, 2014-12-24
@FanatPHP

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.

D
darkfriend, 2014-12-24
@darkfriend

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

P
Puma Thailand, 2014-12-24
@opium

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