Ask YC: DB Scaling question

https://news.ycombinator.com/item?id=364937
by symbiotic • 18 years ago
1 2 18 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:

www.mysite.com?school=someuniversity

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!

Related Stories

Loading related stories...

Source preview

news.ycombinator.com