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: Thursday, June 18, 2015 8:59 AM
Points: 149, Visits: 592
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, December 28, 2015 12:16 PM
Points: 1,676, Visits: 1,948
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