Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 executing except query on partition table

Author  Topic 

yogibaba
Starting Member

2 Posts

Posted - 2013-01-24 : 10:00:23
i have a two partitioned table of same schema and required to find difference using except query on the whole table.

Columns
Id
Prefix name
Start date
End date
Parent id - partitioned

i would like to run except query on the two tables and find different prefix record for the set of parent ids.

Q1, i can run except on the whole table and find the difference. Will internally can i take the advantage of query planner to run parallel threads on each parttiton. If yes how can it be achived.

Q2, we thought of running separate queries on each parttion and put it results in the final table. (select * from t1 where $partition.functition(parentid) = partitionid except select * from t2 where $partition.functition(parentid) =partitionid )
Will this approach help us to take advantage of partitioned table to be queried parallelly


Thanks if anyone can help me out.


   

- Advertisement -