You are going to have significant race conditions. Instead of your current strategy I would recommend using a random integer as an ID, and keeping a date. On collisions just back off and get a different ID. Periodically delete all of the old records.
This won't eliminate race conditions, but it will make them acceptably rare.
In reply to Re (tilly) 1: Cycle through primary key with DBI
by tilly
in thread Cycle through primary key with DBI
by lestrrat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |