On Sun, 2007-08-05 at 12:55 -0300, Jorge Godoy wrote: > I have a PostgreSQL plpgsql function that cleans that up and also collects > some information on a table for statistics. This way, I can know how long > lasted the longest and shortest sessions and when a user last accessed the > system. It also adds a row count so that I have some basis for other kinds > of statistics. > > My "statistics" table has the following columns: > > - id (to be used with SQL Object) > - user id (to correlate with the user's table) > - date when the user first accessed the system > - date of his / her last access > - duration of shortest access > - duration of longest access > - row count so that I know how many rows where analyzed and led to some > update for that particular user > > This function is called from crontab every day to update statistics. > > If you're interested in it, I can share... It was just something that I came > up with to study some access patterns... Nothing too elaborated, as you > could see.
I'd definitely be interested in the queries you are using for cleanup. I won't be collecting statistics like you are, but I'm thinking this would be good information to add to the documentation wiki for identity. Ben --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

