I am using partitioned views in SQL Server 2008 R2.
When I create a query filtering on the partition key (customerID), I get partition elimination as expected.
But when I use a variable to filter on the partition key in a stored procedure, all tables in the partitioned view are hit ! (this is visible in the execution plan).
Is this a know behaviour ? Isn't it possible to run stored procs to filter data against a partition key ?
Thank you