SQL SERVER 2000 Partitioning View Bug

  • Thanks in advance in reading this post ! I'm facing a situation in sql server 2000 sp4 with partitioned views.

    I have a partition views that joins about 10 tables, in each table there is a check constraint.

    For example, if a exec a select count(*) from VIEW where col1 = '20080101' , it goes for the table that has data for '20080101' .

    If I exec a select col1,col2,col3,col4 from VIEW where col1='20080101', it goes to all tables and make an index seek.

    I want the beaviour of query 1, beause it is just looking on 1 table and not one the 10.

    Thanks in advance !

  • Ensure that your constraints have/are created using the WITH CHECK option. If not, SQL Server will look att all your tables even if they do have corretc constrains on them.

    Also check your datatypes. Different data types might mess things up due to the datatype conversion precedence...

    Best Regards,

    Hanslindgren

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply