Wouldn't the ray attack only need to deal damage to a cylinder of the appropriate mass then? Let's take a Medium-sized ray attack against the earth for example. Assuming that a ray attack from a Medium-sized creature is a 5-foot-diameter cylinder, and that the earth has a mean radius of 7918 miles, the cylinder would have a volume of roughly 821,209,714 cubic feet. If we plug that value in with Earth's density of 5515.3 kilograms per cubic meter, we get a mass of 282,749,838,726 pounds (roughly 141,374,919 tons).
141 megatons falls under the weight of a Macro-Medium creature, so the cylinder has 640 hp. Thus, a 5-foot-diameter, 8000-mile-diameter ray attack could punch a hole through the earth even if it did only 640 damage.
Hmmm, that doesn't seem right to me, since I'm sure that it should have much more hp than that from being a small section of a much larger object.
The earth has a mean radius of 3959 miles or 20,902,231 feet. A fireball has a radius of only 20 feet, so you'd need Widen it 1,045,111 times (that's a lot of AMCs required) in order to make it as big as the earth. An epic spell that big would have a Spellcraft DC of at least 4,180,444 (each +100% radius increase from a 20-foot-radius sphere is +4 DC). That means no sidereal could ever hope to blow up a mere planet. Isn't there any alternative that lets us blow up planets?