SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 executing except query on partition table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

yogibaba
Starting Member

India
2 Posts

Posted - 01/24/2013 :  10:00:23  Show Profile  Reply with Quote
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.


  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000