supporting optimize for all indexes