A longer barrel / slide also adds weight which can slow down the cycling of the gun. Extra weight can also make the gun more picky about what ammo it wants to eat.
An extended barrel will give you a slight increase in velocity at the expense of a longer pistol that is harder to conceal. In many shooting disciplines an extended barrel will put you in the same class as heavily modified "open" guns where you will most likely get your *** kicked.
An extended slide/barrel combo offers the advantage of an increased sight radius which can be an aid in accurate shooting. Many manufacturers (Glock, S&W) make their longer slides the same weight as their shorter models (five inch vs four inch) so that the same recoil springs can be used. These slides should not affect the operation of the pistol. Again, altering your gun with a longer slide and barrel can run afoul of the regulations of some shooting discipines. If you intend to shoot competitively you should check the rules before you modify your gun.
Virtually none. A 9mm burns the powder very efficiently and thus any increase in velocity with increased barrel length would be minimal. A longer slide on a semi auto or longer barrel on a revolver offers the advantage of a longer sight radius for increased precision in placing the round on target.