Fix/optimize ALert retrieval with filters.