SAN FRANCISCO (AP) -- Wil Myers takes no solace in extending his hitting streak. It's cool, but losing overshadows all that.
Myers, Matt Kemp and Adam Rosales each hit a home run and combined to drove in six runs, but the San Diego Padres still lost to the San Francisco Giants 13-9 on Wednesday.
"It's tough, but that's the way baseball goes sometimes," Myers said after matching his career high with a 12-game hitting streak. "Every team has their ups and downs over the course of a season. It just so happened that we had a series with a lot of downs. No wins. That's tough."
The Padres lost the first two games of the series by one run and are 4-6 in games decided by three runs or fewer.
"We had competitive at-bats," Padres manager Andy Green said. "That's a step in the right direction. Instead of just competing, we have to get over the hump. We have to execute the little things."
Jemile Weeks tripled in a run and Kemp slammed a two-run homer as part of a four-run third-inning that put San Diego ahead 4-3.
That lead lasted two outs into the bottom of the third, when starter Andrew Cashner (1-2) coughed up three runs to allow the Giants to move ahead for good.
"I wasn't locating the ball very well," Cashner said. "Any time your team puts up nine runs you have to be more efficient. Too many free passes but overall I didn't command my fastball today."
Cashner couldn't get out of the third inning, giving up six runs -- three earned -- on four hits over 2 2/3 innings. He walked four and struck out a pair.
"He threw 89 pitches in 2 2/3 innings. That's a lot of work for him," Green said. "I probably pushed him too far letting him pitch to a guy who he ends up walking. At some point, you have to consider the health of the pitcher."
Brandon Belt was a homer short of the cycle and drove in five runs, and Hunter Pence drove in a pair on three hits for the Giants.
"A lot of guys did good things," Giants manager Bruce Bochy said. "Both teams' offenses woke up. Give our guys credit for not chasing. It got contagious today."
Jeff Samardzija (3-1) went 5 2/3 innings and snapped a tie with a two-run single for the Giants, who won their fifth in six games.
Joe Panik, Brandon Crawford, Trevor Brown and Gregor Blanco also drove in runs for the Giants, who reached a season high in runs. Pence and Matt Duffy each had three hits.
Samardzija won despite allowing a season-high five runs on five hits. He walked two and struck out a season-best seven.
The teams combined for three homers, four triples, three doubles and 15 singles.
Cashner, who also drove in a run, turned in his shortest outing since a two-inning stint at the Washington Nationals on July 5, 2013, and the Padres lost for the 12th time in their past 14 games in San Francisco.
Padres: LHP Robbie Erlin (left elbow sprain) took a break from his throwing program when he felt some discomfort. He'll try again this weekend.
Padres: San Diego gets the day off Thursday. Cesar Vargas (0-0, 1.80) takes the ball for the second time as a major leaguer when the Padres open a three-game set at the Los Angeles Dodgers on Friday night.