TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Columnar Db for Leaderboard Stats?

1 点作者 JoeOfTexas9 个月前
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 个月前
1000&#x27;s sounds like it&#x27;s still Postgres territory?
评论 #41207505 未加载