New York City is undergoing a rare explosion in city government: More people now work for the city — 287,002 full-time employees as of July — than at any other point in its modern history, with thousands more scheduled to join them.

The projected growth finds few parallels in other major American metropolises; most, like New York, trimmed their numbers after the financial crash of 2008. Some have rehired, though not at the level that New York has under Mayor Bill de Blasio.

But behind all the job growth is a complicated set of factors that explain the possible benefits and costs to the city, the mayor and his supporters. Unions will see new jobs for their members, but the city will see future pension costs rise.

And even if the city fails to fill all its projected job openings, there is a benefit: An unfilled job can be taken off the budget, enabling the de Blasio administration to claim so-called savings from the absence of thousands of workers who were not hired.