I have the following query
update rset Comp = t.Compfrom[QlikDataWarehouse].[dbo].[Vente]rinnerjoin[QlikDataWarehouse].[dbo].[Budget] ton t.[Code Site]= r.[Code Site]and
t.[Code Rayon]= substring(r.[Code Structure],1,4)and
t.[Date Time]=convert(date,r.[Date Time])where r.[Date Time]>='2015-01-01 00:0:00.000';
nmber of rows of budget is around 800000 and vente around 350+millions rows . I create index vente([Date
Time], [Code Site], [Code Structure]) and Budget([Code
Site], [Code Rayon], Date Time]). But the query took days running .
t.[Code
Rayon] is an int type t.[Date
Time] is a date type r.[Date
Time] is datetime type Is there a way to make clause On sargable ?
Any help would be the most appreciated.