Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Posts
    14

    Unanswered: Timing Stored Procedure Execution

    What is the best way to time the execution of stored procedures running in Sybase 12.5?

    Our production database is experiencing performance issues and I need to collect some metrics on where the time is going.

    thanks

  2. #2
    Join Date
    Dec 2003
    Location
    FRANCE (Paris)
    Posts
    23
    hi,

    You can use this SQL statement :

    declare @begin,@end datetime

    select @begin=getdate()
    exec <procedure>
    select @end = getdate()

    and calculate @end - @begin to obtain the execution time.
    But if you want some metrics about the procedure execution
    , IO, frequency.... I advice you to install historical server. an ASE component.


    Mickael

  3. #3
    Join Date
    Oct 2004
    Posts
    14
    Thanks Mickael.

    Unfortunately our application is highly complex, and runs hundreds of stored procs, some nested, etc. Also , the paramters for the procs will be coming from our client software, so i was looking for a way to log all proc execution times.

    I will investigate using historical server. Do you know if it comes with sybase or do you have to pay extra for it?

    thanks
    nick

  4. #4
    Join Date
    Dec 2003
    Location
    FRANCE (Paris)
    Posts
    23
    No extra for it, it's one of ASE component.

    Mickael

Posting Permissions

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