I have a couple tables in which I created an object ID as either an Int or Bigint, and in both cases, they seem to autoincrement by 10 (ie, the first insert is object ID 1, the second is object ID 11, the third is object ID 21, etc). Two questions:
Why does it do that?
Is that a problem?
解决方案
Check to see the seed value of the autoincrement isn't set to 10.
You can check by:
SELECT Auto_increment FROM information_schema.tables WHERE table_name='the_table_you_want';
As noted elsewhere you can change by using the system variable @@set_auto_increment_increment
SET @@auto_increment_increment=1;
If you want to start the values at a number other than one you can go:
ALTER TABLE tbl AUTO_INCREMENT = 100;