You want to keep the desk lamp within about 12 inches of the top of the head of the person sitting at the desk, and preferably within a few inches.
The desk lamp should be about the height of the top of the head.
I'm a tall guy and I have an office chair with a very low back. I also have a desk lamp that's about a foot above the top of my head. I don't really have to adjust the height of the desk lamp, but the one on the desk is also fairly low. That way, my eyes aren't too low to the desk and I can easily see things on the desk.