After 11 years under a popular and successful mayor, this city is now considering which of two candidates will lead it next in the never-ending struggle against becoming another Los Angeles.

The record of former Republican mayor Pete Wilson was good enough on this issue to help him vault to the U.S. Senate, with many votes coming even from Los Angeles, which his San Diego constituents so abhor as a pit of urban trouble.

Despite a 29 percent population growth to 900,000 in the last 10 years, San Diego has managed to maintain a blend of parks and clean air mixed with new high rises and wants to keep it that way.

Under Wilson's leadership, the city has also become a laboratory for new ways to cure urban ills, for example, required work for able-bodied welfare recipients to cut fraud and waste, trolley cars to reduce automobile traffic and mail ballots to increase voter participation.

Obviously pleased with such innovations, the city's voters in a March primary picked two mayoral finalists known for their support of Wilson and his policies.

Port commissioner and former city council member Maureen F. O'Connor, 36, and county superviser Roger Hedgecock, also 36, seem remarkably alike. Both emphasize limited growth to forestall untidy urban sprawl such as that found in Los Angeles, and both support strong anti-crime measures and stimulation of new jobs.

They have known each other since they met at a dancing class for Catholic high school freshmen here 22 years ago. In 1971, O'Connor became the city's youngest council member, and in 1977 Hedgecock became San Diego County's youngest supervisor.

O'Connor is a Democrat and Hedgecock a Republican, but Hedgecock has received liberal Democratic support because of his strong environmental record. And O'Connor has received much Republican support, including endorsement by the conservative San Diego Union because of her longtime political alliance with Wilson, who has remained neutral.

Accordingly, the race has grown extremely close. Known from childhood here as one of 13 children in a family of champion swimmers, O'Connor honored a promise to retire from the city council after two terms in 1979. Two years earlier, she had married Robert Peterson, founder of the Jack In The Box restaurant chain, and after four years of work on various city commissions entered the mayor's race with $200,000 of her money and her twin sister Mauvorneen as campaign manager.

In a 20-candidate field, O'Connor placed first with 36.2 percent of the vote while Hedgecock won 30.5 percent.

The latest poll published in The Union showed Hedgecock leading with 43 percent in a 700-voter sample, while O'Connor had 37 percent and 20 percent were undecided.

With so little difference in their stands on issues, O'Connor has taken to suggesting that Hedgecock is too abrasive to build the spirit of bipartisan cooperation under which Wilson ran the city. Hedgecock has attacked O'Connor for being too vague on the issues and for depending on her husband's money.

By election day May 3, both will have spent about $500,000. A Wilson aide said the result would be close but added in light of their mutual compliments to the preceeding mayor, "The city will be in good shape whichever one of them wins."