Skip to content

Comment on Ask HN: Is there a datastructure for leaderboards with filtering and timeslices?

Comments

Are you at the scale where a simple database table and a few queries can't solve this?

Maybe I'm misunderstanding something, but if it's just a few thousand/tens of thousands of entries, it seems like the kind of thing any SQL can do pretty effortlessly...?

Yes, SQL can perform the task, but there are conflicts/performance issues in the ranking algorithm when it comes to tied rankings or pulling from X rank offset. In addition heavy writes and reads may affect performance of other queries outside of leaderboards.

I am slowly working on a gaming portal platform, and I need to be able to host endless amounts of statistic leaderboards which can be individually cut many different ways. I'm researching if its even possible to be a bit more efficient and optimized to make a leaderboard focused database.

I see now, thanks for explaining! (Sorry I don't have a better answer for you.)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.