"Well, that brings back a good memory," Giants manager Bruce Bochy said afterward.
"Definitely had flashbacks," said starting pitcher Tim Lincecum.
Sandoval wasn't the only one who broke out. Brandon Crawford, Hunter Pence and Hector Sanchez all homered, too, as the Giants hit six home runs for the first time since Sept. 18, 2011, in Colorado. In doing so, the Giants also became the first team in Petco Park history to hit six long balls in a game.
No one was quicker to point out the all-around effort than Sandoval.
"That was a great game from every guy on the team, up and down," Sandoval said. "We struggled yesterday to drive the guys in and do our job, so today we came with a renewed approach."
The Giants may have discovered the cure for their situational hitting woes: just mash the ball out of the yard before things begin to get dicey on the bases.
Squandered opportunities littered the first two games of the series -- both Giants losses -- and before Wednesday's contest, Bochy lamented his club's situational hitting. Through four innings, the Giants hadn't put a man in scoring position, but had quickly grabbed a 5-2 lead.
"That's what power will do for you," Bochy said. "You don't have to hit with runners in scoring position if you hit it out of the ballpark."
Crawford got the home run derby started with his ninth of the season, a leadoff shot in the top of the third inning. He picked a conspicuous spot on the dugout bench afterward -- right next to Sandoval.
"He got me fired [up] a little bit," Sandoval said. "We were sitting down; he asked me how many home runs I got. I say, 10, and he was like, I've got nine, I've got your back."
The way Crawford tells it, the makings of Wednesday's back-and-forth began in April, when Crawford got off to a hot start and had more home runs than Sandoval, who replied by telling Crawford to wait until September.
"It's September; I'm only one behind you," Crawford told Sandoval on Wednesday afternoon.
"He said, 'Just wait,' and then he hit three more home runs," Crawford said, with a wry smile.
Maybe the only person in the Giants clubhouse who wasn't smiling after the slugfest was Lincecum, who was making his first start at Petco Park since his July 13 no-hitter.
The veteran right-hander lasted 5 2/3 innings and allowed five runs on seven hits. He gave up a run in the first on a passed ball and another in the second on a Ronny Cedeno long ball, before the Giants responded with eight unanswered runs.
"When you get [the lead] back like that, that should be a springboard to motivate you to do better," Lincecum said. "I didn't take advantage of that lead the way I wanted to."
Lincecum was at his best in the bottom of the first inning after the Padres had scored their first run. With the bases loaded and one out, he fanned Nick Hundley and Reymond Fuentes, making certain the game didn't spiral.
"I think I just focused a little bit more on those pitches and just knew what I had to throw them," Lincecum said. "It was nice to get out of that inning. Other than that, if you look at the whole game as a whole, I didn't do very well. Too many walks, too many fallen-behind counts."
But Lincecum was given all the run support he needed to earn his ninth win. The floodgates opened in the fourth, when Pence crushed a slow curveball from Eric Stults into the left-field seats, and Sanchez deposited a hanging slider into the Giants' bullpen. Both were two-run shots, as was Sandoval's sky-high bomb an inning later.
"We've seen Sandoval since he came into the National League," said Padres manager Bud Black. "When he's hot, he's hot. He can hit any pitch."
Sandoval hit his second homer in the eighth and his third in the ninth -- both opposite-field shots.
The Giants as whole broke out for 17 hits, and their six homers marked the first time they had hit five or more outside of hitter-friendly Coors Field since 2006.
"I think we were all asking, 'Where has that been?'" Bochy said. "It was good to see them break out."