In Sybase Central, click Mode » Application Profiling.
If the Application Profiling Wizard does not appear, click Application Profiling » Open Application Profiling Wizard.
On the Welcome page, click Next.
On the Profiling Options page, click Stored Procedure, Function, Trigger, Or Event Execution Time.
Click Finish.
The database server begins procedure profiling.
In the left pane of Sybase Central, double-click Procedures & Functions.
Right-click the baseline procedure and click 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, click View » Refresh Folder.
The execution times appear for each line in the baseline procedure.
Save the profiling results.
Right-click the database and click Properties.
Click the Profiling Settings tab.
Click 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, click 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 Apply.
Click OK to close the App_Profiling - DBA Database Properties window.
Make changes to the baseline procedure.
In Sybase Central, click 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; |
Click File » Save.
In Procedures & Functions, right-click the baseline procedure and click Execute From Interactive SQL.
Exit Interactive SQL when the procedure completes.
Click this link to continue the tutorial: Lesson 3: Comparing the procedure profiling results.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |