Hefner (2-4) didn't allow a walk while limiting the Padres to one run on five hits, striking out a pair en route to the win.
Thole finished with a pair of RBI and Daniel Murphy went 4-for-4 with two runs scored as New York evened its four-game series.
San Diego's Edinson Volquez (7-8) issued four walks over a 1 2/3-inning start, surrendering four runs on a pair of hits while fanning three.
Alexi Amarista went 3-for-4 with an RBI for the Padres.
Ray Liotta sues skin care company over use of likeness
Aaron Carter is still in love with Hilary Duff