Well, here's the thing.
There are MANY kinds of swords. Some are light and small like the Roman swords, some are huge things like the "long sword" (medieval Europe), or the great sword (some did come in around 10lbs or more). But in most cases militaries used swords to "hack" at other people. You didn't really stab as much as you would slash. The exception being the Roman swords.
With the Roman sword, you would knock down your opponent with your shield, then while he was on the ground go about stabbing him with the sword.
The other swords, in normal military sense, would be used to hack. You would essentially beat your opponent with it like it was a baseball bat, and hope the sharp part cut through their armor, skin, or whole body parts.
On the fencing side of things, stuff gets more interesting. Your goal in fencing was to land your hits without getting hit. A longer sword was one way to do this, but longer swords take longer to swing. Shorter swords are faster but have much less reach.
Different styles of fencing have come and gone, and what they have to this day is essentially a less lethal way to have "personal" sword fights evolved into a sport.
So now let's look at the right type of sword to use for different creatures. Keep in mind that kingledion is right and that you would almost certainly want a spear, but let's play anyway.
So really short swords are good at stabbing already immobilized foes (Roman swords). There also good at knocking away spears and the like to get inside for a hit. They are mostly useless for knocking aside a heavy weapon like a club or hammer though.
Medium swords like a long sword would be good at hacking at enemies. Not so much for stabbing. There too slow to knock aside poles, but could be used to deflect other swords. They may also have a better shot at deflecting heavy weapons like an axe. A club is still going to be an issue though.
The great sword, is another "hacking" sword. It's longer so you can stay further away from your target. But it's also very slow. It can actual cut armor, so it should do ok on troll hides, but once you start swinging it you better connect.
On something the size of a Hippo or Elephant, where your hacking isn't going to work, then you're back to stabbing. All swords can stab, to one extent or another (there are exceptions) but you're going to want the creature basically immobile.
Maybe if a few people with spears pin a creature, so you could walk in and stab it in the head or something.
A heavy sword would almost be a bad thing. You would want a long, but light sword. The best example I can think of is a boar sword.