I have a query like this:
select * from
(

select
a.storecode,a.salenumber ,a.productcode,a.quantity,c.saletime,
LEFT(a.productcode,2) as brand,
SUBSTRING(a.productcode,6,4) as coll
from
saleline as a LEFT JOIN
sale AS c ON a.salenumber = c.salenumber and a.storecode=c.storecode

)
as f
where
f.brand = 'AR'
when I execute running normally (when the process is briefly)
but when I add the condition like this:
where
f.brand = 'AR' and
f.saletime<= '2011-01-31'
very slow

i use sql server 2008

how to fix this problem ?

thank you