hmm a few things i will add/reiterate.
1. walls are easier to get distance than rails because you have to grab the rail which can slow you down. however, with a lot of practice, you should be able to go the same distance regardless of what you grab.
2. practice practice practice hitting the vault at top speed. speed will result in distance. any hesitation or stutter before you go into the vault takes away distance.
3. you need to dive into the vault. this doesnt mean dive into it like you are konging a massive picnic table but think about it. how can you get maximum distance if you take off 2 in. from the obstacle? you will end up with wasted upward momentum and lose distance.
4. to achieve maximum distance, your body must have no DOWNWARD momentum when you contact the object you are vaulting. for maximum distance, your body should have upward momentum when you contact the object. think about it, if you are already travelling up, your push off the obstacle will be easier and will add to the upward momentum and ultimately, more distance. hopefully that makes sense...
if you really think about momentum and direction, it will make more sense of exactly what you need to do.