Eirikur Eiriksson (4/30/2015)
sharonsql2013 (4/30/2015)
Does datediff hinders performance in queries.I am trying to access the records and it takes almost 40 seconds to filter out of 180000 rows. Which is not much of a data...
My only filter is where Time_Created < datediff(day,90,getdate())
Is there a better way to filter for past 90 days
Quick thought, don't think it's the filter that is the main problem, can you post the actual query / execution plan?
😎
Op had the relationship backwards and was returning everything but the last 90 days.
--Jeff Moden
Change is inevitable... Change for the better is not.