Re: [qdbm-users] Please help with elements count.
Brought to you by:
mikio
From: Chris D. <ct...@so...> - 2009-03-11 16:04:51
|
> Thanks for help. Unfortunately i have about 20-30 requests for place per > second. It seems like there should be a clever solution to this problem, but I can't think of it. In the absence of something clever - If reads dominate, then the simple answer is to keep an ordered list in ram and do a binary search to find the score position. Inserting new scores is more expensive of course. I suppose you could also use a flat file for the same purpose. > Theoretically QDBM could know the number of keys under each leaf. For > example Right. I don't think TC keeps that information around. You could always code up a b+tree soultion with this feature (that was my first thought, but seems like to much work). Cheers, Chris Dean |