ASA SQL User's Guide
Monitoring and Improving Performance
Profiling database procedures
Viewing procedure profiling information in Sybase Central
Adaptive Server Anywhere provides procedure profiling information about individual stored procedures, functions, events, and triggers. Sybase Central displays different information about individual procedures than it does about all of the stored procedures, functions, events, or triggers within a database.
When you look at the profiling information for a specific procedure, the following columns appear:
Calls lists the number of times the object has been called.
Milliseconds lists the total execution time for each object.
Line lists the line number beside each line of the procedure.
Source displays the SQL procedure, line by line.
The procedure is broken down line by line and you can examine it to see which lines have longer execution times and therefore might benefit from changes to improve the procedure's performance. You must be connected to the database, have profiling enabled, and have DBA authority to access procedure profiling information.
To view the profiling information for a stored procedure or function
Expand the database in the left pane.
Select the Procedures and Functions folder in the left pane.
A list of all the stored procedures and functions within your database appears on the Procedures & Functions tab in the right pane.
Click the stored procedure or function you want to profile in the left pane.
Click the Profile tab in the right pane.
Profiling information about the specific stored procedure or function appears on the Profile tab in the right pane.
To view profiling information for an event
Expand the database in the left pane.
Select the Events folder in the left pane.
A list of all the events within your database appears on the Events tab in the right pane.
Click the event you want to profile in the left pane.
Click the Profile tab in the right pane.
Profiling information about the specific event appears on the Profile tab in the right pane.
To view profiling information for triggers
Expand the database in the left pane.
Open the Triggers folder in the left pane.
A list of all the triggers within the table appears on the Triggers tab in the right pane.
Click the trigger you want to profile in the left pane.
Click the Profile tab in the right pane.
Profiling information about the specific trigger appears on the Profile tab in the right pane.