PRIMARY KEY NONCLUSTERED

Hi Experts,

I am creating a table for a datawarehouse bd, my question is: because the dimension tables must in PRIMARY KEY NONCLUSTERED

for example:
CREATE TABLE DimProduct
(ProductKey int identity NOT NULL PRIMARY KEY NONCLUSTERED,
 ProductAltKey nvarchar(10) NOT NULL,
 ProductName nvarchar(50) NULL,
 ProductDescription nvarchar(100) NULL,
 ProductCategoryName nvarchar(50))
GO
enrique_aeoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent OlsenData Warehouse Architect / DBACommented:
Hi enrique,

I don't see a question there.  :)
0
PortletPaulfreelancerCommented:
sorry I don't understand what the question is

are you asking: WHY would you use a non-clustered index on the primary key?

(I'm not sure why you MUST do this. Has someone told you to do it this way?)

It is very good to make define the clustered key using fields that will give you maximum advantage - often this isn't the primary key.

(+edit}
here is aprevious question/example of using a clustered key that isn't the primary key:
http://www.experts-exchange.com/Database/MS-SQL-Server/SQL_Server_2008/Q_28294233.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
magarityCommented:
I think you're going to regret making this one nonclustered. Who told you to do it this way?  this is a pretty straightforward table and straightforward looking primary key field.  it's a textbook case to make this a clustered index.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.