Update Query to the version that doesn't use SQL transactions