Any reason why you wouldn't override the save() method of the model in question? When the model with the data you'd like to summarize is saved, you could recalc the data then?
J On Sep 17, 4:20 am, "Bram de Jong" <[EMAIL PROTECTED]> wrote: > hello all, > > I have objects in the db which are being commented/favorited/downloaded > many, many times. > I'd like to keep counts of those verbs, in various time spans (#downloads > today, this month, all time). > > Having done this for another site, I have found that this isn't the easiest > thing in the world when you have heavy traffic: > I had some rather large sql queries running once in a while which do the > counting and store in various tables, but updating almost all rows (each > object gets new counts) each time is a pretty bad idea (especially in > postgres), so I ended up running vacuum analyze every time after the > updates. Right now I'm thinking of creating some separate code for it and > actually store the results in memcached instead of the database. > > Can anyone give any advice on how to do this, in particular (or not!) with > django? > > thanks a lot for any hints! > > - Bram > > --http://www.freesound.orghttp://www.smartelectronix.comhttp://www.musicdsp.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---