Viewing procedure profiling information in Interactive SQL

You can use stored procedures to view procedure profiling information. The profiling information is the same whether you view it in Sybase Central or in Interactive SQL.

The sa_procedure_profile_summary stored procedure provides information about all of the procedures within the database. You can use this procedure to view the profiling data for stored procedures, functions, events, system triggers, and triggers within the same result set. The following parameters restrict the rows the procedure returns.

Keep in mind that there may be more items listed than those called specifically by users because one procedure can call another procedure.

The following sections assume that you are already connected to your database as a user with DBA authority and that you have procedure profiling enabled.

StepsTo view summary profiling information for all procedures

  1. Execute the sa_procedure_profile_summary stored procedure.

    For example, enter:

    CALL sa_procedure_profile_summary
    
  2. From the SQL menu, choose Execute.

    A result set with information about all of the procedures in your database appears on the Results pane.

For more information about the sa_procedure_profile_summary stored procedure, see Adaptive Server Anywhere SQL Reference.


Viewing profiling information for a specific procedure in Interactive SQL

The sa_procedure_profile stored procedure provides information about individual lines within specific procedures. The result set includes the line number, execution time, and percentage of total execution time for lines within procedures. You can use the following parameters to restrict the rows the procedure returns:

If you do not include any parameters in your query, the procedure returns profiling information for all the procedures that have been called.

StepsTo view profiling information for specific lines within procedures

  1. Execute the sa_procedure_profile stored procedure.

    For example, enter:

    CALL sa_procedure_profile
    
  2. From the SQL menu, choose Execute.

    A result set with profiling information for individual procedure lines appears in the Results pane.

For more information about the sa_procedure_profile stored procedure, see Adaptive Server Anywhere SQL Reference.