August 29, 2006 at 7:44 am
Is there any documentation about if a Primary key should be an integer rather than a numeric? This is the situation.
We had a vendor convert a Oracle database into a SQL Server 2000 database. All the Primary Keys were set to a numeric 17(,38,0) column type with identity on. The question is there any impact on performance, DRI, etc. by using numeric PK rather than Integers?
Arthur Lorenzini
August 29, 2006 at 7:52 am
numeric fields can hold values to 2*10^+-38 where as integers are 2*10^+-31 so if you need more than 4 billion values then numeric fields offer a solution.
Storage size for Numerics are 19 bytes as opposed to 4 for integers so there is that to consider. This difference in size does affect performance and obviously storage space especially on larger installations.
If you need something bigger than an integer try BIGINT as this has the 2*10^+-63
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply