Why need so much time form Function

  • Can you show us the code and how you are using it (how you call 'em)?

  • Might be helpful to see what you have done.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Functions are normally slower than other methods.

     

    However, to ensure it is not an indexing issue, run profiler against the call to see what type of output you are seeing.  Sometimes that will clue you in.

     

    It would help us a lot if we saw some representation of the code, however.

     

    The fact that the SP takes 2 - 3 seconds is a long time.  I would start by optimizing that SP.  Reads < 1000 is usually a good target point to start (I try to get mine less than 500 where possible.  My guess is you need additional indexes, or need to change existing indexes.  If you post the code, please post the indexes as well, so that we can judge how those are set up.

     

Viewing 3 posts - 1 through 4 (of 4 total)

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