Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2008
    Posts
    4

    Unanswered: Stored procedure too slow

    When the same code is executed in query analyzer it takes 2s instead of 20s when executing the sp. Any idea?

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Moving to SQL Server forum.

    Look up "parameter sniffing" in google.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Run SQLProfiler with SP:StmtCompleted, and check the duration there. Remember that Duaration is in milliseconds.
    Last edited by pootle flump; 04-30-08 at 11:00. Reason: EDIT - turned off smilies :o)
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    ...whatever you all did to turn off the smilies...
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Robert - if you go to the advanced view when replying or editing, there is a tick box to disable smilies HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    what tick? You mean "Remove Text Formatting"? Let's see...SPtmtCompleted...nope, I wish it were in SSMS...no tick here, except my left-hand pinkie
    Last edited by rdjabarov; 04-30-08 at 11:25.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Nope - screen shot attached. See the bottom visible tick box?

    :) <- no smilie!
    Attached Thumbnails Attached Thumbnails smilies.gif  
    Testimonial:
    pootle flump
    ur codings are working excelent.

  8. #8
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    SP:StmtCompleted...hmmm...Check box!!! It was all blury, and a tick in my right eye;)
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  9. #9
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Robert, you have misspelled "eye". It should not have a semicolon or parenthesis.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  10. #10
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Yeah, this GUI thing is still a challenge for me...
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

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