Does dehydration affect mental performance and memory retention?

Does dehydration affect mental performance and memory retention?