save query resources