How effective is hydration in treating headaches?

How effective is hydration in treating headaches?