Reputation: 1812
I am creating a record system for my site which will track users and how they interact with my site's pages. This system will record button clicks, page view times, and the method used to navigate away from a page (among other things.) I an considering one of two options:
Although I am sure that both methods could easily fill my needs, which would be better in the long run. Other considerations:
Upvotes: 0
Views: 349
Reputation: 1168
As with most performance questions, the answer is 'It depends.'
I would expect it depends on the file system, media type, and operating system of your server.
I don't believe I've ever experienced performance differences INSERTing data into a large, or a small MySQL database. The performance differences manifest when you retrieve that data. The database will almost always outperform queries to files, especially when you want complex or statistical data.
If you are only concerned with the speed of inserting/appending data, and expect a large amount of traffic, build a mock environment and benchmark each approach. If you want to have any amount of speed retrieving that data in a structured way, go with the database.
Upvotes: 1
Reputation: 2647
If you want performance you should inspect the server log, instead of trying to build your log system...
Upvotes: 0