Updated

Matt Cain hopes to turn the page on what by his standards was an awful first half when he takes the hill for the San Francisco Giants on Saturday night in the second contest of a three-game series versus the Arizona Diamondbacks.

Cain went 16-5 with a 2.79 earned run average last season, one that included a perfect game. However, the right-hander stands at just 5-6 with a 5.06 ERA through 19 outings this year.

Cain has gone 0-3 in his past five trips to the hill, logging a 6.38 ERA over that time. He has lasted just a total of three innings in his last two appearances and recorded a mere two outs in his most recent start last Wednesday versus the New York Mets.

The 28-year-old yielded three runs on two hits and three walks in taking the loss, removed by manager Bruce Bochy following 36 pitches and to prevent a possible injury to his hurler.

"That's why I took him out. I didn't want it to become a health issue. I was being cautious," said Bochy. "He's fine. I had some concern there because he was a little off. He was approaching 40 pitches and it's not worth trying to grind him out again.

"I'll be honest. You want to win every game, but you don't want to put somebody at risk trying to win a game."

Cain has not gotten a decision in three starts versus the Diamondbacks this season, posting an ERA against them of 3.79. He is 13-6 in this series lifetime with a 3.39 ERA in 30 games.

Unlike Cain, D'backs starter Wade Miley finished the first half strong and looks to keep the momentum going tonight.

Miley won consecutive eight-inning outings heading into the break and has yielded three earned runs or fewer in eight straight starts. He overcame a slow start to beat the Milwaukee Brewers last Thursday, putting forth a needed effort one day after a 14-inning loss by Arizona to the Los Angeles Dodgers.

The lefty gave up three runs on eight hits, but wrapped up the outing with five hitless frames. The victory improved Miley to 6-7 with a 4.01 ERA in 19 starts this season.

"Everybody knows what happened last night and I was just trying to go as deep as possible," Miley said. "I was fortunate that I started feeling better at the game went along, got into a better rhythm and get through eight."

The 26-year-old has faced the Giants just once this season and did not factor into an April 22 encounter in San Francisco. Miley yielded two runs over 6 2/3 frames and has career numbers of 1-2 with a 3.32 ERA in four games (3 starts) in his series.

The Diamondbacks saw their lead for the top spot in the NL West shrink after losing Friday's opener 2-0.

Chad Gaudin struck out eight batters over seven innings of three-hit ball, teaming with five relievers on the shutout. Sergio Romo hurled a perfect ninth for his 22nd save of the season.

Buster Posey and Hunter Pence each drove in a run during the first inning for the Giants, who have won four of their last five games.

"To come out after the break and win the first game and start the second season off on a good note is exactly what everybody in this clubhouse wanted to do," Gaudin said. "Everybody put together and just worked and battled and we came out on top."

Arizona starter Ian Kennedy was tagged with his third straight loss after giving up two runs on five hits and three walks over six frames.

Miguel Montero and Adam Eaton each collected two of Arizona's five hits as the Diamondbacks dropped their second straight game and saw their lead atop the NL West slip to just 1 1/2 games over the Los Angeles Dodgers.

"We had no offense going on at all tonight," Arizona manager Kirk Gibson admitted. "They just shut us down."

The Giants are 5 1/2 games off the pace.

The Giants are 7-3 against Arizona this season, but dropped two of three to the Diamondbacks at home from April 22-24.