The phrase "sweating like a pig" actually has nothing to do with the animal that you might find on a farm. Instead, it refers to iron "sows" and "piglets" made when smelting pig iron. In traditional iron smelting, liquid iron is poured into a mold shaped like one long line with many smaller lines branching off of it at right angles. This looks similar to piglets feeding from their mother, so these pieces became known as pigs. After the pigs are poured into the sand, they cool, causing the surrounding air to reach its dew point and turn into moisture on the pigs, like they are sweating. When the pig is sweating, it's cool enough to be moved.
More facts about pigs and iron smelting:
Typical dew points are between -4.5 to 15.5 C. in most environments the ambient temperature is above the dew point and no “sweating” will occur on the pig iron (or on anything else in the area).
I suspect that the origin of this phrase may have to do with cooking a whole pig on a spit over a fire. As the pig is cooked it will begin to “sweat”. While opinion varies, a slight sweat is commonly considered ideal. Too much sweating means the fire is too high and too close to the pig. Too little or no sweating means the fire is too cold or too far from the pig.