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 YC: DB Scaling question

1 pointsby symbioticover 16 years ago
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

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