Welcome to the Glock Forum law...!!
To answer your question, the G17 is the original with a barrel length of 4.49 inches as compared to the G34 which is marketed as the "competition" model with a barrel length of 5.32 inches and a longer sight radius...so for target shooting on the range the nod would go to the G34, IMO. Both have a standard mag capacity of 17 rounds, with non-standard mags holding more.