query and transaction logging and timing with contents