[development] Why do we avoid auto-incrementing db columns?

Sammy Spets sammys-drupal at synerger.com
Mon Apr 30 07:22:11 UTC 2007


"pretty much no chance" === extremely rare yet not impossible

-- 
Sammy Spets
Synerger Pty Ltd
http://synerger.com

On 29-Apr-07 23:55, Boris Mann wrote:
> On 4/29/07, Sammy Spets <sammys-drupal at synerger.com> wrote:
> >Earnest,
> >
> >Insertion of 20 million nodes in a short space of time implies 10
> >million users are inserting 2 nodes each in a short space of time. It
> >also implies many other combinations. Looking at the plausibility that
> >this situation become true.... pretty much no chance you'll get that
> >many insertions in the same table at the same time except for the
> >watchdog table.
> 
> Uh. Except for high performance external sources of data feeding a
> Drupal front end. Remember what assumptions make out of you and me...
> 
> Earnest figured it out because he needed to implement it for a project.
> 
> >How does your technique of randomly allocating IDs avoid duplicate ID
> >allocation?
> 
> I believe it checks for dupes and re-randomizes, reading his write up.
> 
> -- 
> Boris Mann
> Office 604-682-2889
> Skype borismann
> http://www.bryght.com


More information about the development mailing list