MySQL vs Plain Files for storing stats?

Hi,

I currently am running a stats service for users to track visitor info - Currently, a folder exists for each user account in the system, and data is stored in flat-text files in each folder for that user. I am working on migrating this to MySQL, for obvious reasons.

Now the way the system works is this - the user places an image on their site, which when loaded, will activate a script on the server that will record down the visitor's information. In other words, each time the image is loaded, the script will save some "stats" data. The problem I've encountered is this - Would it use more system resources to connect to mysql and record down the info, or would opening a file for writing, then append the data, and closing it use more resouces?

(I have around at least 500 active users, so the system is being called at least once per second, most likely more. Also, the database server, web server, etc will all be running under one box.)

Note: I'm not sure if this forum or the programming forum is the proper place to pose this, but I saw another thread in this forum about a similiar problem, so I decided to post here. So, mods, move it to the proper forum if necessary MySQL vs Plain Files for storing stats?

 

 

 

 

Top