Is performance better with no primary key?

In some environments, with millions of rows of data on the tables, that there are no primary keys. They are using just indexing for reporting applications. Is this most efficient for read only environments?

more ▼

asked Dec 06 at 09:15 PM in Default

avatar image

1.4k 100 114 120

It's the good old answer of "It depends".

You don't always need a primary key, a clustered index is more important. You only need a PK if your doing things like replication, or foreign key constraints, but they can get around with a unique key.

Does the table have a clustered index? Are the indexes that are defined sufficient to satisfy the queries being run?

4 days ago anthony.green

Yes. Clustered Indexes. Regarding query sufficiency, that was my question. I was asking to see if it's been determined that queries run faster when tables are created with primary keys. Thank you for your response

4 days ago technette
(comments are locked)
10|1200 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: 5 days ago

Seen: 26 times

Last Updated: 4 days ago

Copyright 2017 Redgate Software. Privacy Policy