That's a good, but tough to answer question, as it is very subjective. Some personal style is involved, here.
Here is what I do:
Right after secondary, when it is time to degas anyway, I use a short cane, so the wine will splash into the bottom. Creates a lot of foaming and lots of CO2 is released this way. This will help immensely to degas the wine.
On subsequent rackings, if the wine seems to be well degassed already, I would switch to the longer cane, so oxidation will not be an issue. However, on these subsequent rackings, if the wine still has some CO2 present, do one more short-cane racking.
Just make sure to keep your SO2 levels up.