TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Columnar Db for Leaderboard Stats?

1 pointsby JoeOfTexas9 months ago
Hey all, I&#x27;m trying to figure out the best way to build thousands of leaderboards for thousands of different statistics scoped to different time windows. I need to be able to calculate a players rank in the leaderboard as well as the surrounding players.<p>I know redis can do this using zset and zrevrange using a new key for each stat&#x2F;timeframe, but it doesn&#x27;t easily allow referencing the player&#x27;s full metadata like name, country, and other default stats like wins&#x2F;loss&#x2F;score. I would have to store those separately and retrieve them each time I pull the top X players in the leaderboard.<p>If I pull top 100 players in a leaderboard, that is 100 player metadata retrievals using some identifier like player id, and it doesn&#x27;t scale well.<p>I&#x27;m looking for something that will allow me to pull the top 100 player id&#x2F;score AND the player metadata in one step, without having to store the metadata within the leaderboard itself.<p>Any ideas?

1 comment

davidw9 months ago
1000&#x27;s sounds like it&#x27;s still Postgres territory?
评论 #41207505 未加载