Always log SQL statements in tests

This will help both with debugging and with optimizing queries.