Added slow query logging.