the longer the better, but make sure it is not longer than the width of your tank, otherwise it will make it harder to fill the tube with water and turn it vertically.
as for controlling flow, mine originally was a python (or maybe another brand) water change setup and comes with a really long hose and came with a shutoff valve. I just reused that. but you can make one using fittings like in the above link.
I initially shut off the valve, fill the long tube with water, lifting it upside down so water goes down the hose up to the valve, fill the tube again with water, then position it hose end up, then open the valve to start the siphon, then vacuum away.
if the tube is longer (and smaller diameter), sand will have longer hang time in the tube before it starts getting sucked into your bucket.