Alex Pavlovic of CSNBayArea.com writes that the San Francisco Giants -- and not the Los Angeles Dodgers -- were the team Zack Greinke was apparently close to signing with before the Arizona Diamondbacks made a late move and got the 32-year-old right-hander:

When Greinke was introduced to the Phoenix media he said that he was "minutes away from going to a different team ... it was that close." It was assumed that Greinke meant the Dodgers, but industry sources have told CSN Bay Area that the Giants are believed to be the "different team," that Greinke was prepared to choose orange and black when the Diamondbacks swooped in at the last minute.

Pavlovic's story details how the Giants moved quick to sign Jeff Samardzija after losing Greinke, then later signed Johnny Cueto. It also means the Dodgers weren't apparently that close to signing Greinke. What scared them off? We can only speculate, but it boils down to not wanting to invest $30-plus million per year in a long-term contract for a 32-year-old, no matter what kind of season he has just had and no matter that the Dodgers can afford the largest payroll in the game.

Zack Greinke should be smiling after the huge contract he got from the Diamondbacks. AP Photo/Rick Scuteri

Back in November, ESPN Insider Dan Szymborski, using his ZiPS projection system, estimated Greinke's future value at seven years and $187 million. He got six years and $206 million.

What's the risk they wanted to avoid? Let's take a look. I checked the best pitchers in the past 20 years from ages 29 to 31 and then checked to see how they did in their next six seasons, from ages 32 to 37, the years of Greinke's contract with Arizona. First, here's our list of best guys with cumulative WAR, via Baseball-Reference.com:

1. Greg Maddux, 1995-97: 24.6

2. Pedro Martinez, 2001-03: 19.6

3. Zack Greinke, 2013-15: 17.5

4. Curt Schilling, 1996-98: 17.4

5. Cliff Lee, 2008-10: 17.1

6. Jason Schmidt, 2002-04: 15.8

7. Cole Hamels, 2013-15: 15.6

8. CC Sabathia, 2010-12: 15.6

9. John Smoltz, 1996-98: 15.4

10. Johan Santana, 2008-10: 15.0

11. Roy Halladay, 2006-08: 15.0

12. Mike Mussina, 1998-2000: 15.0

13. Chris Carpenter, 2004-06: 14.2

14. Mark Buehrle, 2008-10: 13.7

15. Justin Verlander, 2012-14: 13.5

Based on the strength of his 9.3-WAR season in 2015, Greinke ranks an impressive third on this list. Let's see what happened to each of these guys.

Greg Maddux, next six seasons: 27.1 WAR (4.5 per season)

From 1992 to 1998, Maddux was as good as any pitcher who ever lived, posting a 2.15 ERA and winning four ERA titles. He had a league-leading 2.22 ERA in 1998 at age 32 and after a so-so 1999 had two more Maddux-like seasons in 2000 (6.6 WAR) and 2001 (5.1 WAR) before his workload and results fell dramatically. This is one of the best-case scenarios, and Greinke is often compared to Maddux for his command and athleticism on the mound.

Pedro Martinez, next six seasons: 14.4 WAR (2.4 per season)

His age-31 season was his final Pedro-like season. He did help the Red Sox win the World Series in 2004 at 32, posting a 3.90 ERA, and then signed a four-contract with the Mets. He had one final hurrah in 2005 before the shoulder issues that concerned the Red Sox popped up.

Curt Schilling, next six seasons: 41.4 WAR (6.9 per season)

One of the best older pitchers ever, Schilling overcame some arm issues he had in his 20s and finished second in the Cy Young voting at ages 34, 35 and 37. People point to Greinke's athleticism and good health history as a reason he may age well, but here's a guy who had some arm problems and certainly wouldn't be described as the same caliber of athlete as Greinke, but pitched his best baseball in his mid-30s.

Cliff Lee, next five seasons: 21.2 WAR (4.2 per season)

Lee signed his free-agent deal with the Phillies at the same age as Greinke, his age-32 season. Like Greinke, he'd been durable and injury-free, possessing a smooth, easy delivery. He gave the Phillies three great seasons, broke down in 2014, missed all of 2015, and 2016 will be his age-37 season as he reportedly attempts a comeback.

Jason Schmidt, next six seasons: 5.2 WAR (0.9 per season)

Maybe the surprise name on the list, but Schmidt had a great three-year run with the Giants, going 48-20 with a 2.99 ERA from 29 to 31. His strikeout rate dipped a bit at 32, dipped a bit more at 33, and then he signed a three-year, $47 million contract with the Dodgers. His shoulder blew up and he made just 10 more starts.

Cole Hamels: To be determined

He enters his age-32 season with three years left on his contract at $23.5 million per season, plus a fourth year that vests at $24 million based on innings (it also includes a $20 million team option or $6 million buyout). So the minimum the Rangers owe him is $76.5 million for three years.

CC Sabathia, next three seasons: 0.8 WAR (0.3 per season)

He went 15-6 with a 3.38 ERA at age 31, but when he hit 32 everything fell apart.

John Smoltz, next six seasons: 11.8 WAR (2.0 per season)

Smoltz had Tommy John surgery at 33 and missed the entire season, and then spent four seasons in the bullpen. He returned to starting at 38 and actually churned out three more terrific years (5.1 WAR per season). Those final three seasons cemented his Hall of Fame case.

Johan Santana, next five seasons: 0.2 WAR (0.0 per season)

The worst-case scenario: He broke down at 32, and other than 21 starts in 2012 he hasn't pitched since 2010.

Roy Halladay, next six seasons: 24.0 WAR (4.0 per season)

This includes his final season in Toronto and two great ones in Philadelphia (Cy Young winner and Cy Young runner-up) before the shoulder went. Note all the shoulder injuries: Martinez, Schmidt, Sabathia, Santana, Halladay. Everyone blames the Phillies for hanging on too long to their aging core, but they also didn't expect Halladay and Lee to both break down. If you're the Diamondbacks, are you happy if Greinke gives you three Cy Young-level seasons and then breaks down? Guess it depends on the postseason.

Mike Mussina, next six seasons: 28.9 WAR (4.8 per season)

Another best-case scenario.

Chris Carpenter, next six seasons: 13.6 WAR (2.3 per season)

After shoulder problems earlier in his career, Carpenter missed almost all of 2007 and 2008 after Tommy John surgery. He returned to have three solid seasons from ages 34 to 36, including a World Series title in 2011.

Mark Buehrle, next five seasons: 14.0 WAR (2.8 per season)

Workmanlike and durable, but the D-backs are betting on more than a solid innings-eater.

Justin Verlander, one season: 2.2 WAR

The Tigers owe him $28 million per season for the next four years.

Anyway, what's the final tally? So far these pitchers have pitched a combined 56 seasons from their age-32 through age-37 seasons. Their average WAR: 3.0. That number will go down a bit as we tack on the final years from Santana, Lee and Sabathia. Smoltz's value as a reliever wasn't as high as a starter, so that deflates the average a bit as well.

Anyway, if Greinke hits the average of 3.0 WAR, the Diamondbacks would likely be disappointed, but it wouldn't be a catastrophic result. If we estimate each win above replacement on the free agent market at $8 million, six seasons of 3.0 WAR would be worth $144 million. At $8.5 million per WAR, we get $153 million. Factor in inflation and that number goes a little higher. The Dodgers, in fact, reportedly offered him a five-year deal at -- $155 million.

Using this little study, you can see how the Dodgers arrived at that number. They calculated the risk and drew a line. And now Greinke pitches for their division rival.