Page 1 of 1

Mysql Site Log Theory?

Posted: Thu Dec 07, 2006 12:11 am
by Zoxive
I just wanted to know if using Mysql to log every hit to the website with the following information.

User_Id, User IP, Time Stamp, Browser, Referrer URL, Request URI, Session ID.

Using that information i could easily tell which pages are getting the most hits, which users are returning to the website, and a lot more information.

But, taking in this information every time someone refreshes/goes to a page, do you think it would have a big performance impact? and or slow my page to a craw, if i suddenly get maybe 100 users at my site at once?

I kind of think so, and yet I've tested it some what, and barley notice a difference(I dont, but script times are a couple ms longer), but I have yet to test it with some traffic.


Things to do different maybe? Text File(flat file or maybe xml), or using a separate database.

Posted: Thu Dec 07, 2006 12:16 pm
by feyd
It's typically not too much of a performance hit, but why? Aren't standard server logs built just for this? You can import the server logs into a database to make aggregate operations easier, but for the most part the standard server logs work really well for this type of need.