Author: CyrexCore2k | Posted on: 12/20/2008 3:01:55 AM | Views : 260

Hello all,I've been struggling to figure out a decent method for keeping the number of queries my application uses on a per user basis down to a reasonable level. For example:In a web application I've been designing one of the pages displays all the "activities" a user is involved with. The activities have a type, a creator and an image. The creator is another user who has a user type and an image. Lastly the images have types as well.Coming up with a single query for all these is simple enough. SELECT a.*, t1.*, r1.*, t2.*, u.*, r2.*, t3.*FROM activities aINNER JOIN enum_types t1 ON t1.typeid = a.typeidINNER JOIN resources r1 ON r1.resourceid = a.imageidINNER JO ...

Go to the complete details ...