Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    144

    Question Unanswered: Should I used Integer or Numeric identity primary keys?

    Hello!

    Which solution does offer a better performance: Integer or Numeric primary keys (which are Identity columns)? Or the performance gain is dismissable? What about using BigInt? By the way, can I declare unsigned integer or unsigned bigint identity primary key columns?

    Thanks a lot in advance.

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    (BIG) INT is better since it is in a machine-native format whereas NUMERIC is packed decimal and must be converted when you access it.
    Thanks,

    Matt

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    unless you need to store numbers greater that approximately TWO BILLION, i would stick with integer and not use bigint

    as far as unsigned goes, sql server does not support that (non-standard) option -- you may be thinking of mysql

    rudy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •