Giant vegetables, cows like 'heavy-fleshed young matrons', farmers with red faces you can boil kettles on - nothing is more reassuringly British than an agricultural show. By Harry Pearson.
It is the second day of the Great Yorkshire Show, and it is Alan's birthday. Alan is 27. He has the traditional shape of the farmer's lad: a stocky, waistless frame overlaid with a solid upholstery of muscle and a wadding of hard fat. If a killer whale had arms and legs, it would look pretty much like Alan, though only if you first put a baseball cap on its head and painted it ointment-pink.

At two o'clock on a blazing afternoon, Alan has been indulging an old- fashioned British attitude to sunbathing - he has sunk six pints, taken his shirt off and asked his mates to poke him with a fork to see when he's done. If one of them skewered Alan at the moment, steam would come whistling out of the hole. But none of them can get near him because right now he is up on the Citroen trade stand doing a bit of impromptu modelling. He is prancing along the catwalk to the sound of US3's 'Canteloop (Flip Fantasia)', shoulders thrown back, hand on a hip, lips pouted. It is hard to know quite what Alan thinks he looks like, but the large crowd watching his performance are in no such difficulty: they think he looks hilarious. When he trundles from the stage in 30 seconds time, he will receive a huge ovation and celebrate by downing more beer while singing risque songs with a lusty tunelessness.

It would be fashionable, in certain quarters, to point to Alan's drunken display as a symptom of our yob culture. To blame it on the welfare state, pornography or video violence. In fact, Alan's behaviour is part of a great rural tradition. Young men have been bouncing about with boozy boisterousness at Britain's markets and fairs, since long before the birth of Christ. In days gone by, they would have written a folk song about Alan.

It wasn't supposed to be like this at the agricultural shows, however. The agricultural societies that conceived them had a higher purpose in mind. If people wanted entertainment, they could go to the circus. The show was a serious business. For, though it is hard to believe at the Great Yorkshire these days, as you pick your way between the stalls selling fishing-fly pictures, ceramic pigs and hand-painted salt dough, this was once part of a response to a national crisis.

By the mid-18th century, the sudden surge in the population engineered by the industrial revolution (I'm taking the word of the history books on this point because why the invention of the spinning jenny should have caused people to have sex more often is frankly a mystery to me) had left the country wobbling dangerously on the edge of famine. To avert disaster, British farming had to change as swiftly as manufacturing had done. The reformation was led by a new breed of gentleman farmer, the likes of Thomas Coke, Lord "Turnip" Townsend and Earl Spencer, who brought a restless invention to their task, perfecting selective breeding techniques, crop rotation systems and labour-saving machinery. They formed a network of county agricultural societies, gave lectures, carried out experiments and published findings. The problem was that not enough people took any notice. Then someone, possibly Coke, whose public demonstrations of sheep- shearing had been attracting large crowds to his estate at Holkham in Norfolk for some years, hit on the idea of the agricultural show. Here, all the advances would be displayed and explained; the superiority of the new techniques demonstrated; and, to encourage good practices, prizes would be awarded for the best stock and produce. In this context, best usually meant biggest. The oxen were enormous, the ewes huge, the pigs appeared to have been inflated with a foot-pump. Vegetables were of Brobdingnagian proportions: leeks like broadswords, endless carrots, string beans sufficient to rig a schooner. Any passing Frenchman would have been tempted to play petanque with the peas. The shows would be educational, a tool of progress. The effect was dramatic. Starvation and economic ruin were run out of town. In China, Chairman Mao's revolution may have come from the barrel of the gun; in Britain, the agricultural revolution came through the flaps of a marquee, wearing a coloured rosette with the word "first" embossed on it in gold.

The Great Yorkshire Show was first held in 1838, when the Yorkshire Agricultural Society was chaired by Earl Spencer. The changes he and his fellow reformers brought about are best appreciated on the outer fringe of the showground, beyond the society stands of The Country Landowners' Association, The Game Conservancy Trust and Ladies in Pigs ("a voluntary group for women involved or interested in the pig industry"); and past the trade tents of companies specialising in dairy hygiene, farm resin systems and one labelled Semen World, which thankfully proves to be a firm that sells bulls' sperm rather than a promotion for the globe's least appealing theme park. The animals are on display in large Dutch barns and stuccoed brick sheds. There are more than 5,000 of them: 1,800 horses, 705 cattle, 1,500 sheep, 232 pigs, 300 goats and 1024 hens and chickens. They come in a bewildering number of guises because (and don't be surprised if this fact turns up in the next Conservative Party political broadcast) Britain has more varieties of farm animals than any other nation on earth.

Among the sheep pens, farmers from the Dales and the North Yorkshire Moors lean and scratch and chat. They have faces so reddened by wind and sun that they look like you could boil a kettle on them, and quantities of facial hair suggesting that some, at least, have begun to metamorphosize into their woolly charges. Their accents are those of rural Yorkshire, not flat and Boycott-esque, but creaky, warm and worn, so that every time someone speaks, it puts you in mind of a hefty man sinking back contentedly onto an old leather sofa. The air around the sheep pens is full of these sounds, mixed with the nervous warbling of the sheep (if sheep could speak, they would sound like Mavis from Coronation Street), the buzz of electric clippers from the shearing competition, and the acerbic, barber's odour of lanolin.

There are 30 breeds of sheep battling for prizes. Grey Cumbrian Herdwicks stand next to chunky Ryelands whose high quality wool was once so valuable it was nicknamed "Leominster Ore". A group of Muslim women inspect the Wensleydales, whose heavy purled fleece hang in great, creamy dreadlocks. A Jacob's tup of multiple horns, veering off at a variety of angles, above sinister yellow eyes draws the attention of a pair of American schoolgirls: "Gee, is that a goat?"

It isn't, of course. The goats are housed in a separate building. One that smells oddly of goat's cheese. I say oddly because no other animal, apart, obviously, from the adolescent human male, smells of cheese. There is no odour of Stilton around the Dairy Shorthorn cattle, no whiff of Roquefort emanating from the Vendeen ewes. Despite, or perhaps because of the smell, the goat sheds are a hive of jolly evangelism. People who keep goats are great enthusiasts for their beasts. They beat the drum for goat-herding. There are notices and leaflets everywhere explaining the huge benefits that goats bestow: the nutritive value of their milk, the rich flavour of their meat, the high quality of their wool. It's hardly surprising, really, all this effort. When you farm an animal with 2,000 years of close association with the Prince of Darkness, you need all the PR push you can generate.

Over by the wooden pig pens, a little boy is leaning over a gate yelling, "Mam! Mam! Look, look! A ginger pig!" He is pointing down at a snoozing Tamworth sow. She is ginger, too, and she also has a fine, sharp snout. It is often said that a Tamworth's nose is "so pointy, it can pick a pea out of a pint pot". The excited boy is not alone. There are masses of round-eyed kids gawping at the pigs. Pigs exercise a strange fascination over children. When I was a child, one of my greatest discoveries was a sty containing two Great Whites. I rushed home to tell my mother about it, to get her to come and see them, too. She was unenthusiastic. I couldn't understand why. The sty was not far from our house; just across the High Street, in fact, behind the butchers where Grandad went for his Saturday lunchtime pork pie. It wasn't until I was 20 that I made the connection between these facts and my mother's reluctance.

Along the back of the cattle sheds, there are little tea rooms designated to specific breed societies. They have red-and-white checked curtains and windows misted with steam from the kettle. The cattle sheds were the favourite haunt of Victorian show judges, whose descriptions of the prize dairy specimens sometimes reached an almost romantic lyricism. It is as if feelings long repressed are oozing out from the only available fissure. Society show reports speak of "wonderful, heavy-fleshed young matrons" and heifers with "perfect loins" and "grand bosoms". In an era when the sight of a table leg could make a vicar faint, this was heady stuff indeed.

Pass beyond the cattle and you are back in the world of novelty doormats and decorated quails' eggs, the smell of chips and the sound of the spielers: "The first time you use this tool, gentlemen, you'll agree that it's paid for itself... And, see, ladies - instant spiral shapes with zero bother... I have been authorised by my boss for today only to sell this unique item not for pounds 20, not even for pounds 15..."

For the Great Yorkshire Show, this is a recent innovation. On the grounds that it was too frivolous, The Yorkshire Agricultural Society didn't even introduce show jumping to the event until after the Second World War. By the time the show moved to its permanent site in Harrogate in 1951, however, it was not so much flirting with commercialism as making obscene suggestions to it. Some people are repelled by what they see as the destruction of the event's purpose: the turning, they say, of the Great Yorkshire into little more than a giant car boot sale with a few animals attached. But this is to miss the point. Over the years, the agricultural shows have become a popular tradition, and popular traditions are generally shaped more by what people want than by what they need.

Around 90,000 people come to the Great Yorkshire Show each year, and not all of them do so for glimpses of the milk-chocolate and cream flanks of the Longhorn bulls, or the pink noses of the Whitefaced Woodland sheep, or to see the rows of golden competition honey lined up like jars of sunlight. On the courtesy bus back to Harrogate railway station, a Malaysian student and her Australian boyfriend are talking about the show. They think it's cool; they are impressed with the many brilliant things they have seen. "Like what in particular?" I ask. The boy frowns, thinks for a minute, then says: "Well, there was this, like, neat new machine that cut vegetables into spiral shapes without fuss or effort."

It's hard to know what Thomas Coke or Earl Spencer would have made of it, but it's progress of a sort, I suppose.

'North Country Fair: Travels Among Racing Pigs and Giant Marrows' by Harry Pearson is published by Little, Brown on 5 September