Logging details about your site's usage can be very valuable, but if not configured properly, can also be a huge resource drain. The following articles provide useful best practices for managing your Drupal site's logging functions.
It looks like there's a bug in Drupal 7 where, if you ever turn on and activate the Statistics module (enabling the logging of accesses to the database), and then decide to turn off the Statistics module, Drupal keeps on logging to the table that it creates (accesslog), and cron never clears anything out of that table, so it can just keep growing indefinitely. On a busy site, this can result in multiple millions of entries in that table.
Here's what you can do to check for this condition:
Fix Errors Whenever Possible
Although hiding error messages is important from a security perspective, errors and warnings mean that something isn't working correctly, and that could likely have a negative effect on your site. It's best to try to fix them to fix them if you can (especially if they are in your own code), or for third-party contrib modules, report them to the module or project owner.
PHP Message Types
PHP, which Drupal runs under, can generate three types of messages:
If using the "Database logging" module in core, be sure to keep only a small number of entries (1,000 seems reasonable).