Our PHP & MySQL based application creates custom logs which are written to a MySQL database for users actions. We mainly did this for ease of searching and because the app was already using MySQL for persistant storage, so it just made sense.

Our log now contains 17.6 million rows and is 2GB in size. Not that friendly when moving around the place.

I was wondering what the community might suggest as a better more efficient way to store logs. 

You could obviously split this table to 1 weeks worth of all logs and then delete non critical logs and split the table in two for historic critical logs, for such things as payments etc.

In general we're writing to the log through the means of a function such as

```
playerlog($id,$message,$cash,$page,$ip,$time);

```

But that's a fairly simplified version, we're also using MySQL's INSERT DELAYED as the logs are not critical for page loads.