Hi, I'm creating a website where I would like to log each users activity during their visit on the site.
I was wondering whether you'd suggest storing all the information in a file for each user. For example my activity would be logged in the file "/activitylogs/c/chazuk.txt"
Or should all the information be stored in a database?
The only problem I can see with using the database is that there could potentially be millions of entries, which could bog down the server when searching through the data.
This would mainly be used to track how often users are logging in to the site and viewing certain pages.
Thanks for your comments,
Charlie
Logging User Activity
Started by ChazUK, Oct 08 2008 07:17 AM
5 replies to this topic
#1
Posted 08 October 2008 - 07:17 AM
|
|
|
#2
Posted 08 October 2008 - 07:41 AM
The advantage of a database is you can store the date of the activity and purge old records as you go.
#3
Posted 08 October 2008 - 08:12 AM
very good idea! I did not think about removing old records.
I guess this could be done with a cron job that I will look into later
I guess this could be done with a cron job that I will look into later
#4
Posted 08 October 2008 - 09:54 AM
You can even have the act of hitting the website trigger a the old-record cleanup.
#5
Posted 08 October 2008 - 12:34 PM
It wont bog down the server if your the only one looking at the records. You could be the next google or facebook! Know everything about everyone!
#6
Posted 09 October 2008 - 05:21 AM
mikelbring said:
It wont bog down the server if your the only one looking at the records. You could be the next google or facebook! Know everything about everyone!
Yeah, I can build the stuff, but it's making it efficient that I have trouble with!
Thanks for the input


Sign In
Create Account

Back to top









