Query performance improvements.