4 May 2010 mones   » (Journeyer)

running out of ids

Yep, our current client is pretty sure they're gonna run out of identifiers on the database tables (they're NUMBER(32,0) columns). Now we have to change the database design to have tables with composed primary keys, which will unnecesarily make the queries more complicated, instead our simple autonumeric key.

So what do they process? Not much in fact, around 500 requests per day. Oohh! Let's say 1000, to make you happy. Let's say also detail tables will grow even faster: 1000 lines per request (it's unrealistic, but WTF)... so you have now a million of ids used per day.

Well, sounds a lot... but don't be shy: suppose you have enough cores to process it, the bandwidth of several telcos and exabytes of database to waste, the crisis is over and you're the only vendor in the galaxy, so let's say you use 100 billion of ids per day (or 10^11).

That's really a lot! isn't it? Our little NUMBER(32,0) can hold up to 10^32 values, so at that
surrealistic rate you would exhaust it in 10^32 / 10^11 = 10^21 days, or divided by 365 and rounding 2.74 x 10^18 years, or, dividing again, approximately 210,000,000 times the estimated age of the known universe.

Yes, we're running out of ids... and surrounded by monkeys.

Syndicated 2010-05-04 14:34:22 from Ricardo Mones

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!