How does the Indentity property work?

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/sjones/identitylocking.asp

  • Hi,

    Good work, b/c I have done something like storing IDENTITY values in a table in the good old days of FOXPro but Access, SQLServer and even other DBMS products support some kind of ID generation which I think is a better choice. Isn't there anything about the method SQLServer uses to get IDENTITY values?

  • Steve - have you tried comparing your test with one where the table doesn't have identity column? Or maybe uses unique identifier? I'd like to see those results!

    Andy

  • Hi,

    I am probably missing something, but what was the result after all? Were the values spread across different sources or groupped together by the source. I don't think the article states this.

    Thank you!

    Michael

  • This was bascially a test because I was wondering if identity was better than storing the value in a table and manually updating it with each insert. It was a kind of benchmark to see how SQL handles the identity.

    I would like to update this to use uniqueidentifer and run some timing benchmarks.

    Steve Jones

    steve@dkranch.net

  • Under most circumstances I agree that an Identity column is a simple method for numbering rows.

    On occasions where an insert is needed with the "Set Identity_Insert ON" function be aware that: [Execute permissions default to the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and the object owner] from BOL.

    i.e. a user may not be able to perform a bulk insert unless they have these permissions.

  • that is true. haven't run into it, but worth noting.

    Steve Jones

    steve@dkranch.net

  • that is true. haven't run into it, but worth noting.

    Steve Jones

    steve@dkranch.net

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply