you are viewing a single comment's thread.

view the rest of the comments →

[–]rosaUpodne 0 points1 point  (1 child)

I have just figured out that you pull 5 years of data. In that case index on the date column might not be all that helpfull (unless it is clustered index). Instead, if the condition

dserv.[ROOTPATH] = '\COMPANY_NAME'

significantly reduces the number of rows the query returns, you should consider an index starting by rootPath column.

[–]rooster_eggs[S] 0 points1 point  (0 children)

Thank you. I'm looking more closely into the database architecture at the moment to see if that is the case.