Viewing 2 posts - 1 through 2 (of 2 total)
Try to replace in the "where" any function for avoid table scan.
March 26, 2014 at 6:28 am
#1700252
Replace in the query:
WHERE (h.timestamp BETWEEN GETDATE() - 14 AND GETDATE())
The planner does a table scan with that "Where".
by
--> DateIni = GETDATE() - 14
WHERE (h.timestamp BETWEEN DateIni...
March 26, 2014 at 6:21 am
#1700251