SAN FRANCISCO (AP) -- Matt Cain was a hard-luck loser for the San Francisco Giants, the most consistent starter in one of baseball's best rotations who received little run support and often fell short despite solid performances.
It's been a different story this season.
Cain pitched eight solid innings to earn his career-best 15th win, Pablo Sandoval homered for the first time in two months and the Giants moved another game closer to clinching the NL West title with a 7-1 victory over the Colorado Rockies on Wednesday night.
After using 17 relievers over the past three games, leave it to San Francisco's ''workhorse'' to be its first pitcher since Barry Zito on Aug. 23 to last at least eight innings and give manager Bruce Bochy a break from all those walks to the mound.
''I'll have to get on the treadmill tonight to get my workout,'' Bochy joked.
Sandoval's three-run shot in the first inning off Tyler Chatwood (4-5) was his ninth homer of the season and helped hand Cain (15-5) another milestone in a season full of them. With the second-place Dodgers splitting a doubleheader in Washington, San Francisco (86-63) also lowered its magic number to clinch the division to five.
Cain allowed four hits, struck out eight and walked four. Chris Nelson scored on D.J. LeMahieu's flyout in the fifth for the only blemish on Cain's latest gem.
''It feels good to finally get past that 14 number,'' Cain said. ''But you know what? We've got games left, and I don't want to stop now.''
Gregor Blanco added three singles and two RBIs, and Jose Mijares pitched a perfect ninth to give San Francisco its third straight win and seventh in the last eight games.
Chatwood allowed eight hits and three runs in four innings, extending his winless streak to four straight starts as the Rockies dropped their fifth in a row.
Even seemingly unhittable pitches for Colorado these days are proving otherwise.
Sandoval reached in front of the plate to dig out an 0-2 slider near his ankles, pulling it off the right-field foul pole to give the Giants a 3-0 lead on what he jokingly called a ''back-foot slider.'' The switch-hitting Sandoval had gone 161 at-bats since his last home run July 8 against Pittsburgh's A.J. Burnett. He was even teased by pitcher Madison Bumgarner - who homered last week in Colorado - and Cain during batting practice.
''He hadn't hit a home run since like three years ago,'' Cain said, laughing.
''About time,'' Sandoval said.
Chatwood just shook his head on the mound at what Sandoval did with his pitch.
''I've seen him do it here, I've seen him do it in Denver,'' Rockies manager Jim Tracy said. ''I think the intent was to bounce the breaking ball with two strikes, and he didn't.''
In the pitcher-friendly confines of AT&T Park, the home run was just the 24th at home for the Giants this year, which has frustrated hitters but also played into San Francisco's strength.
Cain controlled Colorado's depleted lineup in his typical solid and steady style.
The only hits the hard-throwing righty allowed over the first 15 batters were singles by Nelson. And Cain wiggled out of his only jam when he got Carlos Gonzalez to ground out to second with the bases loaded for the final out of the fifth.
Cain went 14-8 in 2009 and has won at least 12 games in four of his previous eight seasons. Cain, who started the All-Star game for the National League, improved to 14-0 this season when the Giants score at least three runs.
Brandon Belt hit an RBI double and Blanco had a two-run single in the fifth to extend San Francisco's lead to 6-1. Blanco also stole his 23rd base after he singled in the fourth.
Buster Posey's bloop single in the sixth drove in another run and fans again showered the All-Star catcher with chants of ''M-V-P! M-V-P!'' He finished 2 for 4.
Cain eclipsed 200 innings for the sixth straight season.
''The wins, sometimes, there's so much luck involved,'' Bochy said. ''We all know the tough luck that he's had, the tough losses he's had, 1-0, 2-1 and games like that. But he's always handled it well. That's a credit to who he is, his makeup. But things go right, you win 20. It's not always the best pitcher on the staff that wins 20. It's the guy that gets the most run support.''
NOTES: Cain is 28-5 when he throws at least eight innings. ... The Giants honored the runner-up U.S. Little League World Series team from Petaluma in Northern California during a pregame ceremony. Giants players also met with the team and signed autographs. ... Colorado's Jordan Pacheco had the day off because he will start at catcher in the early afternoon game Thursday. ... Jorge De La Rosa will make his first start for the Rockies since Tommy John elbow surgery last year when he faces fellow lefty Barry Zito (12-8, 4.21 ERA) in the series finale Thursday.
Follow Antonio Gonzalez at: www.twitter.com/agonzalezAP