It could be because of a bad execution plan, or it could be because of the data types. Whether it is due to data types is easy to check change your WHERE clause to:where d.date_full >= CAST(@startDate as DATE)
and CAST(d.date_full <= @endDate as DATE)