exit with failure on query failure
reordering
reordering