문제

i have a simple mysql table with innodb as engine and there are only three columns and the server load is also very minimum always under 1 but i can see that there are only 4000 rows inserted but the the autoincrement number of id shows 21000 so i am not clear what does it mean. does it mean that there are 17000 insert failures my table structure is

id           data1                remarks
1             this is text         1
2             another tedt         0

like that table grows but the autoincrement number is creating confusion for me.

i am using mysqli insert

 mysqli_query ($con,"INSERT INTO tablea (data1) VALUES ('$data1')");

please suggest/guide in clearing my doubt at a time maximum 30/40 rows are getting inserted maximum

도움이 되었습니까?

해결책 2

i think i have solved the issue.if your column is unique and mysql tries to insert the data but the data could not be inserted as column is unique but the autoincrement number increases as it tried to insert the data but failed due to unique coulmn propoerties

다른 팁

Auto increment number is never decremented, so 17000 means that there were 17000 inserts. If you have 4000 ties now, then it means that you probably also had 13000 deletes

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top