• subscribe
January 24, 2002 12:00 AM

Make it Short and Sweet

SQL Server Pro
InstantDoc ID #23450

Readers often ask me which data type is the best to use for a primary key. I always recommend the simplest of data types—either an integer or a short-character data type. Managing these data types is easier than managing more complex data types such as variable-length character data types, which require additional processing with each operation. Every time SQL Server has to access a record that contains variable-length fields, for each data record and for each index built on those data records, SQL Server has to check the column offset array to determine at which point the variable-length field begins in the data record. SQL Server's additional activity creates increased overhead that might become a liability when your databases grow or when the queries accessing the data become more complicated.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...