improved batch query

Uses batch delete function and keys_only