speed of performing @@identity

Results 1 to 3 of 3

Thread: speed of performing @@identity

  1. #1
    SQL Guy Guest

    Default speed of performing @@identity

    inside a stored procedure is it a big performance hit if i call select @@identity to return the increment value? the stored procedure does get hit a lot

  2. #2
    MG Guest

    Default RE: speed of performing @@identity

    If you need the identity value then getting it via a parameter of the stored procedure is going to be the fastest way to do it. It you don&#039t need the identity value returned, then of course it will slow things down a bit but we are talking about hundreths or thousands of a second.

  3. #3
    SPG Guest

    Default How much do you need it?

    Performing the @@identity check would be faster and possibly more reliable (depends on your architecture; especially under high-traffic situations) than trying to concoct a different query to get "That Record That Was Just Posted".<BR><BR>So, if you have to get the @@identity value, the @@identity pickup is (afaik) the fastest way to do it. Of course it&#039s faster to not do it at all, but you hardly get the same results. ;-)

Posting Permissions

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