Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase «««12345

Compare Dates in an iterative manner for a particular set of records Expand / Collapse
Posted Thursday, November 13, 2008 2:38 PM


Group: General Forum Members
Last Login: Monday, August 25, 2014 10:23 AM
Points: 149, Visits: 591
that means that you have a lot "bad" de dates in table. in reality difference probably will be more significant
Post #602414
Posted Thursday, November 13, 2008 2:51 PM


Group: General Forum Members
Last Login: Saturday, March 21, 2015 8:34 PM
Points: 1,619, Visits: 1,891
No, actually, only 10,000 PersonIds in my test table of 5 million rows (1 million unique PersonIDs) have records that are out of order; that's about 1% of the ids. That also explains the nice lift, because the subselect has far fewer rows for the distinct to operate on.

Note: the subselect finds roughly 20,000 rows, distinct return 10,000 rows.
Post #602425
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse