"He just wakes up and hits," Cain said. "I don't understand how he does it, but he does it."
Sandoval sat out four games with tightness in his right elbow and started at first base for the first time.
"I didn't realize he was playing first until we took the field," Burriss said. "He doesn't play for a few days and he comes in and gets a couple of knocks. We didn't expect anything less."
Burriss added a key defensive play at second base in the seventh, when he snared Chris Duncan's low liner with two outs and a runner on.
"It was hit hard and all I had time for was a dive," he said. "In terms of range it wasn't that far."
"Those were plays that wins ballgames," Giants manager Bruce Bochy said. "Our defense really stepped up."
Cain (6-1) was the main benefactor of the solid play. He gave up two runs -- one earned -- on six hits in 6 1/3 innings. He walked two and struck out five. He's won his last four decisions.
"You try to build off the momentum of your last start," Cain said. "The big thing is the guys are going out and scoring early. That's a big confidence booster when you can go out there with a lead."
Cain has pitched at least six innings in all 10 of his starts and allowed two or fewer runs in eight of them. He retired nine of the first 10 batters he faced.
"Matt has been locked in from Day One," Bochy said. "He's locating better and has that focus. He has a look about him on the mound."
"We have the confidence that if we do have the lead we can hold it," Wilson said. "When the starters are going six innings, the bullpen knows their roles. When you start playing as a team, collecting hits, playing defense, as a whole you're playing better and that's what you're seeing right now."
Pujols had two hits and scored a run for the Cardinals, who lost for the third time in 10 games. Colby Rasmus drove in a run and Ludwick, in his first game back off the disabled list, scored on a throwing error.
"[Cain] throws 94-95 [mph] for one and then he's got a slider, the changeup and the big slow curveball," Ludwick said. "What made him tough for me is he got the curveball over twice. First pitch for a strike and then you're in the hole against a guy that's got good stuff."
Joel Pineiro (5-5) pitched a season-low four innings, allowing four runs on six hits with a walk and three strikeouts.
"Whenever I left the ball up I got hurt," Pineiro said. "I was a little bit surprised when I came out, I thought I still had stuff to go back out there and give them another inning or two."
Pineiro hasn't had much success at the Giants' new ballpark in two starts. He's given up 10 earned runs in 7 2/3 innings here. He was looking to become the first pitcher since Greg Maddux in 1995 to record five straight starts of no walks and no home runs.
Aaron Rowand, who has hit safely in all nine games since assuming the leadoff spot, doubled to open the first.
Giants RHP Sergio Romo (right elbow sprain) was activated from the 15-day DL while INF Kevin Frandsen was shipped to Triple-A Fresno. ... Cardinals SS Khalil Greene went on the disabled list with social anxiety disorder. Ludwick was activated off the DL. ... Opponents are hitting .109 (5 for 46) against Cain with runners in scoring position. ... Pineiro fell to 0-3, with a 5.93 ERA, against the Giants in seven appearances. ... The Cardinals allowed more than three runs for the first time since May 18.