var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Member statistics table or main table
I have a members table. Should I put statistics like blog count, topics count, post count etc in a separate member_statistics table OR the main members table?
If going for a separate table, should it be named statistics or something else?
separate table, same table, it doesn't matter
statistics, some other name, it doesn't matter
Can't you just work out the stats on-the-fly?
SELECT Count(*) As number_of_blogs
ON members.member_id = blogs.member_id
WHERE members.member_id = @member_id
Assuming this is anything more than an utter failure of a site, stuff like post count you wouldn't want to work out on the fly. Can you imagine scanning the entire DBF table to count up every time this page is shown to display your 9k post count and Rudy's 14.7k count?
ur codings are working excelent.
touché - I wasn't considering scalabilty in my answer.
The reason why I wanted to put it in a separate table was to avoid read/write locks. The member table is read more often and because the "count queries" are in a transaction, it would lock the table.