Re: [qdbm-users] Please help with elements count.
Brought to you by:
mikio
From: Oleg P. <syb...@gm...> - 2009-03-11 23:05:17
|
2009/3/11 Chris Dean <ct...@so...> > > > 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. It's a gaming portal. Users play a lot. So the number of updates is much more than selects. (200 updates/s - 200 game matches per second are overed - + 25 selects/s, so any type of caching is useless). The portal is heavy loaded (60.000.000 pageloads/day) so usually standart solutions do not work in my case. > > > > 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). Yeah, especially for balancing b+tree. > > > Cheers, > Chris Dean > > |