PHOENIX -- One game against Arizona cleared out a lot of bad memories for the San Francisco Giants.
Jason Schmidt outpitched Brad Halsey for the second time in six days, and the Giants snapped their four-game losing streak with a 11-3 win over the Diamondbacks on Tuesday night.
It was San Francisco's first game since Sunday's 16-0 loss to Oakland.
"After 16-0, to win 11-3 is a little bit redeeming for the guys," Giants manager Felipe Alou said. "I know it was not the most enjoyable day off."
Moises Alou drove in three runs with a single and sacrifice fly, Mike Matheny drove in two with a double and single, and Jason Ellison, Omar Vizquel and Pedro Feliz had run-scoring singles.
San Francisco, which blew open the game with a six-run ninth, also scored on a double play, Troy Glaus' throwing error and a wild pitch by Brandon Medders.
Schmidt (6-3) won his third straight start, giving up three runs, nine hits and three walks in six innings and improving to 8-0 in his last 12 starts against Arizona. While he struck out the side in the fifth, he also allowed Chad Tracy's double and two walks in the inning.
"That ended up being a little bit more of a hairier inning than I wanted it to be," Schmidt said. "Kind of doing the intentional-unintentional walks, a base hit here or there, but luckily I came out of it unscathed. It definitely takes a little bit of gas out of you."
San Francisco had not won since Schmidt beat the Diamondbacks 5-3 last Wednesday.
"He made his pitches when he needed them," Tracy said. "That's just a sign of a good pitcher -- getting out of jams, and he did it."
Arizona got three runs in the third, when Craig Counsell hit a solo homer and Glaus had a two-run double.
"We were kind of flat there for a while, and then Couns hits a home run, and we get a few more hits and it looks like we're in pretty good position," Diamondbacks manager Bob Melvin said. "But then you've got to go back out there and hold, and we didn't."
Tracy matched his career high with four hits, three of them doubles, which tied the Diamondbacks' record.
Halsey (4-7) allowed five runs -- four earned -- and eight hits in 5 1/3 innings.
Arizona led 3-2 in the fourth when singles by Alou and Feliz, and a walk to Ray Durham loaded the bases with no outs. Todd Linden hit into a double play as the tying run scored, and Matheny's double put San Francisco ahead 4-3.
"Every win is big right now," Matheny said. "I'm very excited that Jason did what he's done the last couple of outings -- give us a chance -- and that we had timely hitting and the defense. Those are components of winning, and it's nice to see they showed up today."
Feliz hit a leadoff double in the sixth, took third when Durham sacrificed and scored when Linden grounded to third and Glaus threw wide of catcher Chris Snyder for an error.
Snyder also got hit on the right foot by Counsell's grounder to the right side of the infield in the fourth inning. Snyder was between first and second when he was hit, causing the final out of the inning. Counsell was credited with a single.
Feliz tied his season high with three hits and has 16 RBI in 18 games. ... Before his third-inning double, Glaus was hitting .150 (6-for-40) with two outs and runners in scoring position. ... Schmidt is 12-6 in 23 starts against the Diamondbacks. ... Arizona LF Luis Gonzalez, on bereavement leave since Saturday, attended his stepfather's funeral in Tampa, Fla., on Tuesday. Manager Bob Melvin said Gonzalez could rejoin the team as early as Wednesday or Thursday. ... Tracy's only other four-hit game was April 22 last year at Milwaukee. It was eighth time -- the third this season -- that a Diamondbacks player had three doubles.