I have a 10" 222 Remington that will shoot 3/8" group at 50 yards with cheap 4x scope with a range bag for support, I also have a 22WMR barrel that is almost as good, and a 10mm auto barrel that does real good also if connecting holes a 50 yards is good enough.
For me if I was new to varmint hunting with pistol the G2 with a 20 or 22 caliber, I've had two 17 caliber guns, a rifle and revolver by the way, and would go with 22 caliber because those 17's are a PIA to clean and are often touchy about accuracy fally off in real low number of fired rounds. If you do not already have a 222 and don't reload, then 223 is trhe way to go. All those 17 calibers, 20 calibers and odd 22 caliber like 22-250, 22 Hornet, 222 and others will take all the fun out of shooting when paying $15 to $20 or more for a box of 20 rounds that's for sure. The 223 is also excellent varmint round and is averaging about $7 to $8 a box at discount stores, so really 223 is a no brainer in my book.