If you want to extend the range of the round, just aim higher and arc the bullets in.
The highest you can arc your barrel up to achieve the longest range possible for a specific loading is 45degrees up, and that is only if you are firing in a vacuum.
Any higher and you lose range as HK just said.
Now, in the real world, we do not have a vacuum, bullets have to fight fluid, which is air in this case.
Since air exerts a fluid drag on a bullet, even if it is a boat tail, the max you can arc your bullets is by tilting your barrel up is around 30degrees.
Raise your barrel up any higher and again, like HK said, you lose range.
To aim with such howitzer firing angles, you had better be good with trig and draw up some firing tables for each loadings, or carry with your a calculator or computer and appropriate app to do that calculation for you.
And before your shoot, you had better know the range of the target too.
Aside that you could hit a target very far away, you also have to consider the energy loss, again due to the fluid dynamics of aerodynamic drag.
Shoot a target too far away and the bullet will bounce off his forehead like an airsoft pellet only to piss him off.
Or possibly amuse him a little and make him laugh.
Anyway, I digressed too much here.
The point is going with a longer barrel, say 18in or 20in, can capture more wasted powder burn to accelreate the 5.7 projectile a little more to give it more muzzle velocity and thus more muzzle energy.
The question is loading: too little powder (such as some subsonic loadings of the 5.7) and you could put yourself in danger of a squib (not enough powder to push it all the way out the barrel).
On the other side, too much loading and sure, you will push the projectile all the way out the muzzle, but you could blow up the action and the firing chamber, etc.