I take a hit in the dark, but ... you want a random value to be unique, but less than 16 bytes. Your best bet is still the GUID, which is only 16 bytes .... You want to use alphanumeric characters to ... some parameters.
Use a GUID, but encode it. base64 looks like 7QDBkvCA1 + B9K / U0vrQx1A, which is 22 bytes, which is even longer than the native Guid ... but shorter than a typical string representation.
See text encoding here: http://en.wikipedia.org/wiki/Globally_Unique_Identifier
Another option would be a Guid hash, but you will lose some uniqueness, so what is your level of tolerance here for non-historical items?
===========
Assuming you have one process that is inserted into the table, you can emlpoyee the HiLo algorithm and be sure that you do not need to hit the DB every time. You just saved the last high value in your memory ... when you started the process, you would go in dB to find out where you left off: What is the Hi / Lo algorithm?
I'm still saying that Guid is your best bet .... 16 bytes are not bad and will be as small as most alphanumeric solutions you came up with.
Joshberry
source share