log timing of database queries