|
|
| go ahead... be a heretic | |
| PerlMonks |
Re: Cycle through primary key with DBIby Daddio (Chaplain) |
| on Jun 04, 2001 at 23:24 UTC ( [id://85661]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
And yet another idea would be to just keep on going with the primary key number, checking the total records on each write and deleting any > 1000. This would probably avoid more of the race conditions, allow for the same or faster execution time (I believe DELETing a "specified" row and WRITing the "next" would be at least as fast as an UPDATE or REPLACE), and give you cleaner code as you would always know the "last inserted" id, should you need it at some point. My $0.02... D a d d i o
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||