Updated

SAN DIEGO -- Arizona Diamondbacks right-hander Shelby Miller is keen to prove he is able after being unraveled by Cain.

Miller faces the Padres on Tuesday night in a game that kicks off San Diego's second homestand.

Jarred Cosart (0-0) is matched against the unpredictable Miller (1-1) as the Padres try to snap a four-game losing streak in the first of three games between the clubs at Petco Park.

Miller's pitching deteriorated after he allowed a booming fifth-inning double to Giants pitcher Matt Cain in his last start. Before San Francisco's second hit, Miller was cruising, retiring eight of nine batters and protecting a 1-0 lead.

However, the inning turned into a three-run bonanza for the Giants. Miller wound up charged with three runs on seven hits in 5 1/3 innings during a game Arizona went on to lose 6-2.

Miller was hopeful his second season with the Diamondbacks would include a burst from the gate. Arizona paid a dear price in acquiring him before last year, one that was nothing but a bummer for Miller.

He bounced between the majors and minors, unable to find focus or consistency. He finished at a cover-your-eyes 3-12 with a 6.15 ERA.

But Miller, coming off an encouraging spring training, has also showed how effective he can be this season. The Diamondbacks have their fingers crossed Miller, who is 1-2 in his career against the Padres, is on the rise.

"A lot of people were writing about or talking about, 'What happened? What's wrong with Shelby Miller?"' Diamondbacks pitching coach Mike Butcher told USA Today. "Nothing's wrong with Shelby Miller.

"Everybody who's played this game knows this is a tough game. He had a little speed bump last year. He's in a really good place right now, mentally, physically, emotionally."

Cosart is in a new place on the San Diego staff with Luis Perdomo waylaid by a bum shoulder. Cosart has seized the opportunity after first getting a starting audition while filling in for Trevor Cahill.

Cosart threw four scoreless innings in his lone start of the season at Coors Field last week, and he has the inside track to stay in the rotation with another good showing on Tuesday.

"Nerves early," Cosart said after his outing against the Colorado Rockies. "I'm just trying to feel my way through instead of just trying to execute the pitches and execute the scouting report. Then the third and fourth (inning), I felt like that's where I'd like to be for the rest of the year."

If Cosart can beat Arizona for the second time in as many career decisions, it would be his first win since Sept. 24, 2015. Cosart went 0-4 last year pitching for the Marlins and Padres.

The Diamondbacks, who just split a four-game series with the Dodgers, have defeated the Padres in four consecutive games and took 10 of 19 games from them last year. Arizona swept the visiting Padres in a three-game set to end 2016.

The Padres are coming off a four-game sweep by the Braves in Atlanta. San Diego was outscored by a 23-8 margin during the initial series at new Sun Trust Park.