The global length of ditches is unknown but very large. In many European countries, the total ditch length rivals that of their streams and rivers. The Netherlands has 300,000km of ditches criss-crossing agricultural land. In Finland, networks of forestry drains total around 1 million km.
Ditches can emit large amounts of greenhouse gases (CO2, methane and nitrous oxide) that contribute to global warming and climate change. Ditches often contain stagnant water and are commonly found in agricultural and urban landscapes, which means they can receive high nutrient inputs from agricultural runoff containing manure and fertilizers, and from stormwater runoff containing lawn fertilizers, pet and yard waste.
This creates the low-oxygen, high-nutrient conditions ideal for the production of greenhouse gases—especially methane and nitrous oxide, whose global warming potentials are much higher than CO2.
The ditches aren’t the problem, there’s always been water runoff, in the past they were probably (and I’m only saying probably because I’m not doing the research) CO2 sinks. It’s the ludicrous amount of fertilizer (nitrates AND phosphates, let’s stop arguing about which is worse and regulate them both please) that’s being overwhelmingly pushed into the ditches, and probably the "clearance"of those ditches to keep them free of large plant life and flowing.
Ditches aren’t the problem, profit minded agriculture is the problem.