I have a table with a primary key with automatic addition. This table is for storing millions of records, and now I do not need to delete anything. The problem is that when inserting new rows due to some error, the auto-increment key leaves some spaces in the auto-increment identifiers. For example, after 5, the next identifier is 8, leaving a space of 6 and 7. The result of this is when I count the lines, the result is 28000, but the maximum id is 58000. What could be the reason? I do not delete anything. And how can I fix this problem.
PS I use insert ignore when inserting records so that it does not throw an error when I try to insert a repeating record in a unique column.
mysql primary-key
Sourabh
source share