http://example.com/article/story?storyID=19039&ref=329932&sessionID=9043275
http://example.com/article/story?storyID=19039&ref=902932&sessionID=9023409
http://example.com/article/story?storyID=19039&ref=904354&sessionID=8230235
... infinite ...
Canonical URL meta tags can help.Filtering out certain query parameters (JSESSIONID, PHPSESSIONID, etc) can help.
Sitemaps help.
I'm rather impressed that search engines do it so well. I imagine the right approach involves examining the contents of the pages and doing checksums, but I'd love to know what the real search engines do.
I do know that a naive crawler will completely fail to crawl any significant portion of the real web without solving this. It's quite possible those 250 million "pages" were actually something like 1 million distinct pages.