php - Queuing update requests for a giant update? -


i have site, , when user action wish add count of how many actions person has ever done. naturally i'd "update user table each time!" don't feel if that's solution, , i'm interested in seeing if there way this.

basically user log in , start using actions, , every time make action [whatever] , @ end of day, take [whatever]s , make query, saving resources on each action. site grow 1,000 users, little queries start adding up! there 1 type of "action", sake of question assume each page load action.

if single session, store (queue) "all updates" in session / global variable. update @ end of session.

if multiple-session system, suggest doing above , update table @ end of each session.

:(upwards of few hundred kbs, not idea):

you want make shortcode endcoing /decoding library store sessions vars. if talking huge data. example, if have drag , drop system, intermediate states key<>val pair structures. eg: loc_a=widget_1 ; loc_b=widget_88 .. on , forth..

is making sense?


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -