You are here: Re: identity column « MsSQL Server « IT news, forums, messages
Re: identity column

Posted by Erland Sommarskog on 06/08/05 00:56

Simon Hayes (sql@hayes.ch) writes:
> You might use IDENTITY as an artificial key either because there is no
> natural key for the table, or because the natural key is so wide
> physically that it creates real performance issues.

Just to add to this: Adding the IDENTITY column could in fact
decrease your performance as well, as the table would be larger. If
there is a child table, that could use this identity column as its
FK, then that table could indeed be smaller. Then again, you could then
find that more operations on the child would require joining to the
parent table, in which case you are again losing in the IDENTITY column.




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация