Ask YC: DB Scaling question
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!
2 comments
[ 2.6 ms ] story [ 20.3 ms ] threadIt's like magic, but real.