It appears that for most of their history, artillery/cannons were used predominantly on sea and in fixed positions, rather than at land.
For instance, typical armies in the Napoleonic wars would have a few hundred cannons. In contrast, a typical ship-of-the-line during this era would by itself boast up to a hundred guns. At Trafalgar, the British fleet had at least 2,000 guns between them - ten times as much as a typical army of the period
Why was the production and use of cannons geared so much towards naval combat (and presumably fixed defenses - forts/etc.)? Was making artillery mobile/transportable cost-prohibitive, or was it difficult to train crewmen? What prevented countries from gaining a military advantage by earmarking much more artillery for mobile land warfare?