In Sybase Central, choose Mode » Application Profiling.
If the Application Profiling Wizard does not appear, choose Application Profiling » Open Application Profiling Wizard.
On the Welcome page, click Next.
On the Profiling Options page, select Stored Procedure, Function, Trigger, Or Event Execution Time.
The database server begins procedure profiling.
In the left pane of Sybase Central, double-click Procedures & Functions.
Right-click the baseline procedure and choose Execute From Interactive SQL. Procedure profiling is enabled, so execution details for the procedure are captured.
Close Interactive SQL.
View the profiling results.
In the left pane of Sybase Central, select the baseline procedure.
Click the Profiling Results tab in the right pane. If no results appear, choose View » Refresh Folder.
The execution times appear for each line in the baseline procedure.
Save the profiling results.
Right-click the database and choose Properties.
Click the Profiling Settings tab.
Select Save The Profiling Information Currently In The Database To The Following Profiling Log File, and then specify a location and file name for the profiling log file.
Click Apply. Do not close the properties window.
The procedure profiling information that was just gathered is saved to the specified profiling log file (.plg).
Enable baselining against the profiling log file.
On the Profiling Settings tab of the App_Profiling - DBA Database Properties window, select Use The Profiling Information In The Following Profiling Log File As A Baseline For Comparison.
Browse to and select the profiling log file you created.
Click OK to close the App_Profiling - DBA Database Properties window.
Make changes to the baseline procedure.
In Sybase Central, choose Mode » Design.
In the left pane, browse to and select the baseline procedure in the Procedures & Functions.
On the SQL tab in the right pane, delete the existing INSERT statement.
Copy and paste the following SQL statement into the procedure:
INSERT table1 SELECT COUNT ( * ) FROM rowgenerator r1, rowgenerator r2, rowgenerator r3 WHERE r3.row_num < 250;
Choose File » Save.
In Procedures & Functions, right-click the baseline procedure and choose Execute From Interactive SQL.
Exit Interactive SQL when the procedure completes.
Click this link to continue the tutorial: Lesson 3: Compare the procedure profiling results.
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|