I'm improving our SSIS process passing the variables through a "declare" and I found this:
Here you have the plan execution using variables
And here without variables
I cant put links, so i deleted the "." from ".com". Just put it on the url
As you can see, when I use the "declare" SQL Database Engine don't use the Index. The index used is an nonclustered for the column used on the "where"
Both executions were on the same server, with the same set options and at the same time executed.