[ic] A new User Tacking - RFC

Paul Jordan paul at gishnetwork.com
Sat Mar 11 16:19:46 EST 2006


Jon Jensen wrote:
> > Is doing a UPDATE query on most every page a bad idea? If 
> it is, then 
> > is it better or worse than the logging going on on most 
> pages with the 
> > current "usertrack" method.
> 
> Database writes are slower than log file appends.
> 
> It may still be fast enough, depending on your traffic level, 
> whether or not you have a dedicated logging database server, 
> etc. A really important question is concurrency. If you're 
> using MySQL with MyISAM tables, any write locks the entire 
> table. So you're likely to see things bog down under load. 
> With PostgreSQL and possibly with MySQL and InnoDB, you 
> should be able to do frequent INSERT operations cheaply, but 
> UPDATE will be slower and may block for that row.


Wow, I was not aware a write locks the entire table.


> > My alternative to this is to have a cron once a night go 
> through the 
> > new files in orders/session/* and grab the treasure trove of 
> > information there.
> 
> That would be a nice way of doing it. You could do that right 
> before your regularly scheduled purge of old sessions.


Thanks Jon, yes I have going to look into having some script made for me
that does that. I think having just these things in usertrack, and building
proper pages to report on it and a combination of other tables would pretty
much give one *any* report some fancy package does.

Thanks for your insight, it saved me from doing it the only way I know how,
which would have been a poor implement :-)


Paul



More information about the interchange-users mailing list