PDA

View Full Version : Database Structure Question


sabret00the
12-06-2004, 05:23 PM
i've got a table

groupid | title | approved
------------------------
data | data | data

however ias part of a query i need to grab both the postcount and membercount of each of these groups, i'm wondering if i should add the additional columns to store the information or should i just grab the information via a leftjoin and SELECT COUNT query?

Natch
12-06-2004, 07:27 PM
JOIN it would be best I think, unless you wanna create caches and store the results in the datastore (not ideal with a constantly updated value like postcounts).

sabret00the
12-06-2004, 08:35 PM
thanks natch, will go about tit that way then :)