views:

33

answers:

1

Hi,

I have partitioned a table and it has been partitioned according to an account id. ie also rows that have accountid =1 will be in A partition and all rows that have accountid = 2 will be in B partition. so now if i execute a query with where condition accountid =1 sql server will search only in A partition.

Suppose if i add another condition to it ie where accountid=1 and place="aaa" will this query search only A partition or the entire table? Please help.

+1  A: 

It should search only partition A.

You can verify this by examining the execution plan.

Mitch Wheat
Thanks for the reply.But what about inner joins ie if i inner join the partitioned table with another table that may be partitioned or not and add where clause that includes accountid =1. Will this search partition A only in the partitioned table.
Sidharth
@sidharth: that's a different question, but Yes it certainly should do. Examine the query plan to be sure.
Mitch Wheat