Click here to monitor SSC
SQLServerCentral is supported by Redgate
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: Wednesday, November 23, 2016 8:12 AM
Points: 149, Visits: 594
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: Monday, August 22, 2016 6:14 AM
Points: 1,683, Visits: 1,949
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