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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask YC: DB Scaling question

1 点作者 symbiotic超过 16 年前
My site is divided into sections based on the school where users are located. For each school I have an entry in an mySQL database which stores some information about that school. Users access their particular schools website through URL GET varaibles:<p>www.mysite.com?school=someuniversity<p>My question is this: In terms of scalability is it better to query the db for the specific school info each time a page is loaded or should I query only the first time a user visits a particular school and cache the info in session variables? Or is there a third alternative that is preferred? Any advice would be greatly appreciated or just a point in the right direction to finding this info myself. Thanks!

1 comment

bcater超过 16 年前
<a href="http://www.danga.com/memcached/" rel="nofollow">http://www.danga.com/memcached/</a><p>It's like magic, but real.
评论 #365115 未加载