If you intend to carry it concealed the smaller one is a lot better, depending on how you carry it; some guys say they carry a full size Glock concealed just fine, but for most of us I think smaller is better. There is no significant loss of power in the smaller one. The shorter handle has a slightly smaller magazine capacity (15 vs 17). But the smaller one will take the bigger magazines, so if you carry extra magazines, which I recommend, carry the bigger ones.
If you intend to carry it in the open and concealment is not a factor and you are certain it never will be, might as well get the bigger one.
I carry a 27 (subcompact .40 caliber), with extra full size magazines. The subcompact is a little harder to shoot, but if you practice with it enough (which you should do) you should be able to use it effectively. I'll go out to the range and fire off four or five boxes of 9mm out of my Glock 19 and also shoot a magazine-ful or so out of my 27 and there is no difference in shot placement (no practical difference anyway).
My 19 is my workhorse practice pistol. I've probably run thirty thousand rounds through it and it still has a lot of life left in it. I bought it as a police trade-in. This is a good option if cost is an issue. Last time I talked to Logan Smith of Smith Arms and Ammo he had a list of police trade-ins that he can get for a good price. That was over a year ago but it wouldn't hurt to check. If cost is not an issue, might as well buy a brand new one.