Msg#: 3724990 posted 5:18 pm on Aug 17, 2008 (gmt 0)
I've got a page where the user has different content on separate tables, such as photos, videos, messages, etc, and each time a page is viewed, a COUNT(*) query is performed on each table to get the user's content count.
The point is that I need to start avoiding DB queries because some tables are starting to crash often due to heavy access, and I'm not sure how to proceed. The 2 alternatives I handle are:
1. Reading the tables only on user login, and storing required info on $_SESSION variables 2. Creating a "user_status" table with only the user info required to show on all pages, and query it on every page shown
I'd really appreciate to hear some suggestions on which method to show, and if there's a better way to do it. As usual, thanks in advance!