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 (Sybase Central)
Connect to the database as a user with DBA authority and enable procedure profiling. See Enabling procedure profiling.
In the left pane, double-click one of the following: Triggers, System Triggers, Procedures & Functions, or Events.
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.
An expected object might be missing because it has not been executed. Or, it may have executed but the results have not yet been refreshed. Press F5 to refresh the list.
If you find more objects listed than you expected, one object can call other objects, so there may be more items listed than those that users explicitly called.
To view in-depth profiling results for a specific object, double-click the object on the Profiling Results tab.
The right pane details are replaced with in-depth profiling information for the object.
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:
Column | Description |
---|---|
Name | The name of the object. |
Owner | The owner of the object. |
Table or Table Name | The table a trigger belongs to (this column only appears on the database Profile tab). |
Event | The type of object, for example, a procedure. |
Type | The type of trigger for system triggers. This can be Update or Delete. |
# Execs. | The number times each object has been called. |
# msec. | 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, detailed information specific to that object appears in the Profiling Results tab. The information displayed includes:
Column | Description |
---|---|
Execs | The number of times the line of code in the object was executed. |
Milliseconds | The total amount of time that a line took to execute. |
% | The percent of total time that a line took to execute. |
Line | The line number within the object. |
Source | The 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.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |