In our MSSQL server 2008 R2 environment, we have a table which we have partitioned based on a yearly partition function.
We need to define a view on this table and want to take advantage of table partitioning while running query on this query.
From following text quoted from MSDN I understand that we will need to create a CHECK constraint on our partitioned tables.
CHECK constraints are not needed for the partitioned view to return the correct results. However, if the CHECK constraints have not been defined, the query optimizer must search all the tables instead of only those that cover the search condition on the partitioning column.
Please suggest how I can achieve this. If, in case, I am wrong in my approach, please help me correct the same.