Locking is one of the predominant costs in transaction processing. While much work has focused on designing efficient locking mechanisms, not much has been done on understanding how transaction applications issue queries and leveraging application semantics to improve performance. This paper presents QURO, a query-aware compiler that automatically reorders queries in transaction code to improve...