prepare query on single row queries