Transaction Logging
do not put echo or print in a database connection class at execute query function if you have a daemon which output is written in a log file.
log only the data crucial for debugging, if something should gone wrong. like transaction id, error id, and the query that caused the program to abort.
if you must write every query executed by the db server, make a cronjob to periodically backup the files, clean the space, so you could use it for somethin more useful. not that i say loggin is not useful.

