If I was buying a new gun I would look for one in the 24" range...
I have a Rem 870 with a 26" barrel and it shoot awsome out to 45 yards. I put a 20" rifle sighted barrel on it and it does not shoot as good as the longer barrel. But I like a short barrel and I like rifle sights also. That is why I opted for the the shorter barrel