Improve deleteByQuery