database - mysql aggregate vs store - micropayments forum -
i launched world's first micropayments forum... rudebagel. explaining friend how on user's profile page (ie "bob") possible see posts bob had valued sorted valued least valued. that's when realized table (user_values) in mysql db stores each transaction... results might this...
- "my awesome sunset" - $0.25 cents
- "my awesome sunset" - $0.25 cents
- "my awesome sunset" - $0.25 cents
- "momentous monkey" - $0.10 cents
- "momentous monkey" - $0.10 cents
bob clicked quarter button 3 times sunset , dime button twice monkey. i'd have aggregate data.
i'm not database expert... , anxiety of complex aggregated/joined tables tempts me create table gets updated whenever transaction made. use table sorting value , other table (user_values) displaying recent activity.
here's page contains code when coin button clicked...
my economics better programming.
so should create table store aggregated info or should aggregate user_values table every time info requested? if aggregating way go... what's query? in advance!
Comments
Post a Comment