Put query out-side tx.