Large Auto Increment IDs

强颜欢笑 提交于 2019-12-04 22:00:48

As an answer for others experiencing this issue.

The reason for the big steps was due to a MySQL Configuration that ClearDB had implimented.

Their reasoning for doing this is listed here: http://www.cleardb.com/developers/help/faq#general_16 (Thanks Razor for this)

If you need to investigate your increment settings yourself you can run the following query

SHOW VARIABLES LIKE 'auto_inc%';

this will output something like

auto_increment_increment    10
auto_increment_offset   1

So you can see the reason for my jumps was because this was set to 10.

As @Juergen d said you should be able to change this if you need to by the following queries.

SET @@auto_increment_increment=1
SET GLOBAL auto_increment_increment=1;

I however didnt change this setting as ClearDB set it for a reason, and I was only querying this incase it was something i had mis-configured.

Case Closed, Thanks to everybody for their input.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!