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 2012 Forums
 SQL Server Administration (2012)
 Unique Partition key
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sql_msg
Starting Member

USA
13 Posts

Posted - 08/15/2014 :  19:43:55  Show Profile  Reply with Quote
Hi,

I want to understand the why the partition key should be unique or a kind of primary key(but not necessarily).

What is the exact reason,,anyreference or link that explains will be helpful.

Regards,
msg

gbritton
Flowing Fount of Yak Knowledge

1496 Posts

Posted - 08/16/2014 :  06:58:05  Show Profile  Reply with Quote
SQL does not use a partition key but rather a partition function.http://msdn.microsoft.com/en-us/library/ms187802.aspx
Go to Top of Page

sql_msg
Starting Member

USA
13 Posts

Posted - 08/18/2014 :  14:56:34  Show Profile  Reply with Quote
Yes I agree we have to partition function but my concern was with the key we consider for the partition function should be unique/ or part of the primary key..its recommended. My question is why it is should be unique/ column best candidate for Clustered Index if Index is not there ?

Hope this time the question is clear ?
Go to Top of Page

gbritton
Flowing Fount of Yak Knowledge

1496 Posts

Posted - 08/18/2014 :  15:28:38  Show Profile  Reply with Quote
The partition function can be anything at all. It can be related to the primary key if that makes sense but can be something else entirely. It's not so much that you choose one "key we consider for the partition function". You choose some column or combination of columns that makes sense for your business. One popular choice is a datetime column if it is set at insertion time to the current datetime (e.g. getdate()) Then your function can say "split on the year 2013", or something.
Go to Top of Page
  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.06 seconds. Powered By: Snitz Forums 2000