HELP - Random numbering & Random ASCII

D

Dirk Goldgar

Klatuu said:
You, know, I wasn't doing the math. with 130,000 records and
requiring a unique string of only 4 characters, it should not really
be a problem. Given 36 possible characters to enter into a 4
character string, that would be 36^ 4 which is not quite 1.7 million
possibillities.

I make that roughly 8% probability of a duplicate, if it's 130K records
and not 13K. 8% isn't that great (though it seems to have worked for
the OP), but .8% is not bad at all.
 
G

Guest

It was 130K
(from the OP)
so I don't have to manually enter this for 13000+ records.

Just under 8% is what I calculated.
She responded that is worked for her.
My original concern, more that whether there were enough combinations to go
around, was performance. I did the math because I got concerned about how
many disc fetches would be required to get a unique combination.
 
D

Dirk Goldgar

Klatuu said:
It was 130K
(from the OP)
so I don't have to manually enter this for 13000+ records.

13000 = 13,000 = 13K
Just under 8% is what I calculated.
She responded that is worked for her.

Right, so all is well.
My original concern, more that whether there were enough combinations
to go around, was performance. I did the math because I got
concerned about how many disc fetches would be required to get a
unique combination.

I was concerned about performance, too. That's why I proposed alternate
versions, including approaches that would "shoot first, and check for
duplicates later". I think we were both aware of the potential issues,
though it appears I was needlessly concerned about the risk of
duplicates, given that it's a one-time import.
 
G

Guest

yeah, a one time import, but I wonder if she has considered keeping a version
of that function around to add new records to the database. If she will be
doing it one at a time, it shouldn't be a problem for a long time. If she is
doing batches and the database grows significantly, at some point in time,
performance will suffer because the probability of hitting a duplicate goes
up.
 
D

Dirk Goldgar

Klatuu said:
yeah, a one time import, but I wonder if she has considered keeping a
version of that function around to add new records to the database.
If she will be doing it one at a time, it shouldn't be a problem for
a long time. If she is doing batches and the database grows
significantly, at some point in time, performance will suffer because
the probability of hitting a duplicate goes up.

I agree.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top