Hi,
My fantail had the beginnings of SBD when she was in a smaller tank (2 goldies in a 20 gallon) and the nitrates were consistently high.
I upgraded to a larger tank and started feeding them spirulina flakes as well as progold, peas, etc. She hasn't floated upside down since last May when I set up the 50 gallon tank--there are 3 large goldies in it.
So, a combination of plenty of space, the proper food, keeping nitrates down with partial water changes and not overfeeding will help prevent SBD.