Fix/optimize for ALert retrieval by filters.