in reply to Re^2: Don't-Repeat-Myself code for improvement (foo foo)
in thread Don't-Repeat-Myself code for improvement

That's a good point, and an interesting solution provided that the number of IDs is small, but horribly expensive if the number of Ids is much more than the 8 shown.

40 thousand entries for the 8 IDs shown is managable, but if the number rises to 15 then wouldn't you need something like 70 terabytes to store the permutations?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^3: Don't-Repeat-Myself code for improvement (foo foo)

Replies are listed 'Best First'.
Re^4: Don't-Repeat-Myself code for improvement (foo foo)
by tye (Sage) on Feb 28, 2007 at 01:21 UTC

    No. My solution uses one DB record per ID. I don't try to store in a DB all possible permutations. I just put one record per item in the DB and "permute" their initial order, such as by setting the "lastused" field for each record to be some random time of day "yesterday", as I mentioned.

    - tye