SAN DIEGO (AP) -- Shelby Miller hopes he's on his way to putting his awful 2016 season behind him.
Backed by Yasmany Tomas' three-run homer, Miller pitched 7 1/3 innings of four-hit ball and the Arizona Diamondbacks routed the San Diego Padres 11-2 on Tuesday night.
The Padres lost their fifth straight game. They were coming off a four-game sweep at Atlanta.
More from FoxSports
Miller (2-1) kept the Padres off balance most of the night, including four 1-2-3 innings, as he pitched into the eighth for the first time this season. San Diego broke through in the third with Wil Myers' two-out RBI single to center, but otherwise was frustrated.
Miller was not. He needs just one win to match his total from last year, when he went 3-12 with 6.15 ERA in his first season with Arizona. He was even demoted at one point, making eight starts in Triple-A.
"It's great. The biggest thing is just trying to go out there and compete, no matter what the circumstances are," Miller said. "Last year, I only won three games and the year before that only six. My biggest thing was trying to get back to winning, not only for myself but for the team. I think we're in a great place. It's just all kind of coming together for us and we've got to continue going and just continue to play the best ball we're doing and I think we'll be in good shape."
Miller allowed a double to Travis Jankowski leading off the eighth, struck out Christian Bethancourt and then made way for Randall Delgado. Miller struck out five and walked two.
"I thought it was a great outing for him. I was excited because of all the hard work he's putting in and he deserves moments like that," manager Torey Lovullo said.
"For us to send him back out in the eighth inning meant a lot to him, I'm sure, but it also helped us win the ballgame by the way he performed today, and that's what it's all about," the manager said. "He was just very effective and controlled all the pitches in all innings. I think he had only one inning where he threw more than 20 pitches. That's crucial."
Tomas' line-shot homer to left capped the four-run fifth and gave the Diamondbacks a 7-1 lead. His second, it went an estimated 378 feet. Paul Goldschmidt was aboard on a walk and Jake Lamb on an RBI single.
Arizona's Chris Ianetta homered to right-center off Zach Lee in the eighth, his second.
Padres starter Jarred Cosart (0-1) left after 3 2/3 innings with a strained right hamstring. He came out after walking Brandon Drury with the bases loaded. Craig Stammen came on and promptly threw away Chris Owings' comebacker for a two-run error.
"It was a tough loss," San Diego manager Andy Green said. "Today's game is just that kind of a painful baseball game where you lose your starter when he's throwing very, very well."
Cosart allowed three runs, one earned, and two hits. He struck out two and walked two.
Cosart said he got hurt running out a bunt in the third inning.
"It didn't quite feel right and then progressively pitch by pitch the next inning it started getting tighter and tighter," Cosart said. "I continued to try to get through it. I was hoping it was a cramp or something like that and it just didn't go away and it started affecting command a lot, and that's when I came out and it was done."
The game got so out of hand that 33-year-old Padres shortstop Erick Aybar made his big league pitching debut in the eighth, taking over from Bethancourt to get Chris Hermann to ground out.
"I started cranking my arm toward him at shortstop to see if he wanted to pitch and he cranked it back at me," Green said. "So at that point I felt like Christian had thrown enough pitches, and frankly at some point in time you've got to smile, you've got to enjoy the moment, that smile relaxes them going into tomorrow and I think Erick coming in relieves a little bit of the tension from the game today."
As it is, the Padres are experimenting with having Bethancourt pitch. Normally, he's a catcher. He allowed two unearned runs and one hit in one inning, with two strikeouts and two walks.
Diamondbacks: RHP Zack Greinke (1-1, 4.32) looks to bounce back from a 7-1 loss to Clayton Kershaw and the Los Angeles Dodgers. He is 8-1 with a 2.02 ERA in 16 career starts against San Diego.
Padres: RHP Jhoulys Chacin (1-2, 7.80), who spent part of the 2015 season with Arizona, is scheduled to make his fourth start for San Diego. He is 5-3 in 14 career appearances, including 13 starts, with a 3.04 ERA against the Diamondbacks.