"There’s a great argument for keeping the
meta-data about those objects (owner, modification time, id, path,
size, etc.) in MySQL. That’s what a relational database is
designed to handle. There are excellent choices for distributed
file systems or similar systems that are designed to store binary
objects in an efficient and easily addressable way.
"Similarly, logging is often tossed into MySQL. This often leads
to a couple problems. First off, most logging ends up being
information that you rarely need to reference. So you’re
writing lots of data that eats up disk space and, more importantly,
space in InnoDB’s buffer pool. Worse, log tables often grow
without bound. It’s easy to think that you’ll write
that log purging script once the site it “big enough”
or when all the higher priority work is done. In reality, that day
never comes and, in the midst of troubleshooting something
unrelated, you discover that the log table has grown to an alarming
"Consider using an existing centralized logging system.
Something as simple as syslog or syslog-ng logging to a network
logging host may do the job. It’s easy to configure
syslog-like systems such that logs are archived every day or week,
compressed, and kept until they reach a given age."