阅读背景:

使用时间戳作为主键时,避免主键约束违规

来源:互联网 

I have a database table where the primary key is defined as a timestamp. The application inserts records to the database based on a certain event that is triggered and the timestamp used will be the one that created this instance. Since this application is running on multiple servers and that event is triggering at the same time in more than one of these servers at the same time, in some cases, the data doesn't get inserted to the database due to the primary key violation. I have a database table where the primary key i




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: