Showing posts with label impact. Show all posts
Showing posts with label impact. Show all posts

Monday, March 26, 2012

Primary versus unique keys

Hi

What impact is there in using a unique index instead of a primary key?

How does this impact performance?

How does this impact data file size?

Does it impact anything else?

Thanks

Hi,

http://www.mssqlcity.com/FAQ/General/primary_vs_unique_constraints.htm

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

|||

Hi

It that the only difference?

Is there any impact on Replication, Database Mirroing (SQL 2005), or any other features?

Thanks

|||

There is an impact on transactional replication (all options) since it requires a primary key (unique indexes do not work). No impact to either merge or snapshot replication.

Database Mirroring and other features don't care.

Tuesday, March 20, 2012

Primary Key Column

Does position of primary key column in a table has impact on perfromance ? I
have always used first column(or columns) for primary key. I am looking at a
system right now which has primary keys defined in the middle or end of
table. Does it impact performance ?
Any help is appreciated. Thanks.
No impact. What has impact is what indexes you have and how they are defined. And remember that a PK
definition creates a unique index (by default as a clustered index).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"B2" <B2@.discussions.microsoft.com> wrote in message
news:D6C7E1FB-CAAF-4275-9FBF-F5C6F235B2E0@.microsoft.com...
> Does position of primary key column in a table has impact on perfromance ? I
> have always used first column(or columns) for primary key. I am looking at a
> system right now which has primary keys defined in the middle or end of
> table. Does it impact performance ?
> Any help is appreciated. Thanks.
>

Primary Key Column

Does position of primary key column in a table has impact on perfromance ? I
have always used first column(or columns) for primary key. I am looking at a
system right now which has primary keys defined in the middle or end of
table. Does it impact performance ?
Any help is appreciated. Thanks.No impact. What has impact is what indexes you have and how they are defined. And remember that a PK
definition creates a unique index (by default as a clustered index).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"B2" <B2@.discussions.microsoft.com> wrote in message
news:D6C7E1FB-CAAF-4275-9FBF-F5C6F235B2E0@.microsoft.com...
> Does position of primary key column in a table has impact on perfromance ? I
> have always used first column(or columns) for primary key. I am looking at a
> system right now which has primary keys defined in the middle or end of
> table. Does it impact performance ?
> Any help is appreciated. Thanks.
>

Primary Key Column

Does position of primary key column in a table has impact on perfromance ? I
have always used first column(or columns) for primary key. I am looking at a
system right now which has primary keys defined in the middle or end of
table. Does it impact performance ?
Any help is appreciated. Thanks.No impact. What has impact is what indexes you have and how they are defined
. And remember that a PK
definition creates a unique index (by default as a clustered index).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"B2" <B2@.discussions.microsoft.com> wrote in message
news:D6C7E1FB-CAAF-4275-9FBF-F5C6F235B2E0@.microsoft.com...
> Does position of primary key column in a table has impact on perfromance ?
I
> have always used first column(or columns) for primary key. I am looking at
a
> system right now which has primary keys defined in the middle or end of
> table. Does it impact performance ?
> Any help is appreciated. Thanks.
>