Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Monitoring and Improving Performance » Application profiling » Procedure profiling in Application Profiling mode

Disabling procedure profiling Next Page

Analyzing procedure profiling results


Even though it is called procedure profiling, you are actually able to view profiling results for stored procedures, user-defined functions, triggers, system triggers, and events in your database.

To view procedure profiling information in Sybase Central
  1. If you have not already done so, connect to the database as user DBA, and enable procedure profiling. See Enabling procedure profiling.

  2. In the left pane, select the type of object for which you would like to see profiling information. Your choice must be one of the following: Triggers, System Triggers, Procedures & Functions, or Events.

    A list of all objects in the database for that type appears in the right pane. For example, if you selected Procedures & Functions, the list of all procedures and user-defined functions in the database appears.

  3. In the right pane, click the Profiling Results tab.

    A list appears of all the objects of the selected type that have executed since you enabled procedure profiling. For example, if you selected Procedures & Functions, a list of all of the procedures and user-defined functions that have executed since you enabled procedure profiling displays.

    If you expected to find an object there but it is missing, for example an event, it may be because it hasn't executed yet. Or, it may have executed but the view has not yet been refreshed. While details are refreshed periodically, you can cause a refresh at any time by pressing F5.

    If you find more objects listed than you expected, remember that one object can call other objects, so there may be more items listed than those that users explicitly called.

  4. To view in-depth profiling results for a specific object, for example, line-by-line execution details, double-click the object on the Profiling Results tab.

    The right pane details are replaced with in-depth profiling information for the object.

How to read procedure profiling results

The Profiling Results tab provides a summary of the profiling information for all of the objects, grouped by type, that have been executed within the database since you started procedure profiling. The information displayed includes:

ColumnDescription
NameThe name of the object.
OwnerThe owner of the object.
Table or Table NameThe table a trigger belongs to (this column only appears on the database Profile tab).
EventThe type of object, for example, a procedure.
TypeThe type of trigger for system triggers. This can be Update or Delete.
# Execs.The number times each object has been called.
# msecs.The total execution time for each object.

These columns, and their content, may vary depending on the type of object.

When you double-click a specific object, such as a procedure, in the Profiling Results tab, in-depth information specific to that object appears. The information displayed includes:

ColumnDescription
ExecsThe number of times the line of code in the object was executed.
MillisecondsThe total amount of time that a line took to execute.
%The percent of total time that a line took to execute.
LineThe line number within the object.
SourceThe code that was executed.

Lines with long execution times compared to other lines in the code should be analyzed to see whether there is a more efficient way to achieve the same functionality. You must be connected to the database, have profiling enabled, and have DBA authority to access procedure profiling information.