Code Analyst Tutorial
Go Up to Code Analyst
The following tutorial guides you through the process of using the Code Analyst.
Creating a Code Analyst Session
- On the Tools menu, select Code Analyst.
- Initially, Code Analyst installs the repository tables. For more information, see Installing Code Analyst. Then Rapid SQL opens the Code Analyst to the Run Summary tab.
- On the Code Analyst Tools toolbar, click the Create New Collection button.
- Rapid SQL opens the first panel of the Code Analyst Wizard.
- Select the individual object or group of objects to analyze. In this example, an individual stored procedure (CREATE_ADMISSION2) is selected.
- Tip: Code Analyst does not let you select objects that do not have stored procedures.
- Click Next.
- If the object(s) selected to be analyzed requires parameters, the second panel of the wizard prompts you to enter the parameters.
- Double-click the object to set the parameters.
- For IBM DB2 LUW for Open Systems and Oracle, the Compile button opens the Confirm Compile dialog box that lets you compile the objects to ensure that the Code Analyst can capture the time metrics.
- Click Finish.
- Code Analyst displays a message that the Code Analyst will run longer than the actual code. Then Code Analyst analyzes the objects, using the IDERA SQL Debugger to profile and then opens the Run Detail tab.
- Tip: You can select the "Please do not show me this dialog again" option in the dialog box or set the option on the Code Analyst Options.
Identifying and Fixing Bottlenecks Using Code Analyst
The Run Detail tab displays the total time for the objects being analyzed. The tab information may be enough to identify the potential bottleneck.
- To view more detailed information, double-click the Unit Name.
- Code Analyst opens to the Unit Detail tab.
- The Unit Detail Tab displays the object code and other information related to the individual lines of code. You can determine which line of code is taking too long and why. The Unit Detail Tab is where you troubleshoot, and then resolve the problem in the Modifying objects using editors.
- In Rapid SQL, open the object editor, and then modify the code on the Definition tab.
- Click Alter.
- In Code Analyst, on the Unit Detail Tab, click Execute.
Comparing Code Analyst Sessions
- Click the Comparison tab.
- Examine the Time Diff which indicates improvement to code.
- If necessary, continue to modify the code on the Definition tab of the object editor, and then press Alter.
- In Code Analyst, on the Unit Detail Tab, click Execute.
- Examine the Time Diff until the bottleneck is solved.
Common Tasks
- Creating a Code Analyst Session
- Identifying and Fixing Bottlenecks Using Code Analyst
- Comparing Code Analyst Sessions
- Cloning a Code Analyst Session
- Deleting a Code Analyst Session
- Stopping a Code Analyst Session Execution
- Executing a Code Analyst Session
- Scheduling a Code Analyst Session
- Unscheduling a Code Analyst Session
- Refreshing a Code Analyst Session
- Saving Results in Code Analyst
- Printing Results in Code Analyst
- Viewing Run Details in Code Analyst
- Viewing Unit Summary Information in Code Analyst
- Viewing Unit Details in Code Analyst
- Setting View Options for the Unit Detail Tab in Code Analyst
- Extracting SQL Text in Code Analyst
- Executing SQL in Code Analyst (Rapid SQL)