Interesting. What you seem to be describing is a "Pyramid Scheme" which implies that any solution you use needs to scale well unless you don't get enough suckers to make the scheme worth while.
Maybe you need to turn your thinking about the database on its head. Instead of walking down a tree to figure out who gets to collect the money from whom, you should walk up the tree each time a new member is added to figure out who they pay money to. That means that for each new member you hit the database maybe half a dozen times instead of potentially thousands of hits walking down the tree.
In reply to Re: Recursive programming question
by GrandFather
in thread Recursive programming question
by ukndoit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |