in reply to Cycle through primary key with DBI

Advice.

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.

  • Comment on Re (tilly) 1: Cycle through primary key with DBI