Analyzing an ad hoc statement
To analyze an ad hoc statement
- In the Performance perspective, click the Add view
menu arrow and then click Add SQL Statement View.
- Complete the SQL tab:
- Enter a name for the statement.
From the DB2 Connection list, select a Db2 subsystem.
- (Optional) Enter the table qualifier.BMC AMI Command Center for Db2 uses this qualifier if the table in the SQL is unqualified.
- For the Explain Type, select Dynamic.
- At Degree, select the degree of parallel processing to allow:
- Select Any to allow parallel processing.
- Select 1 to prohibit parallel processing.
- Type or paste the SQL statement into the SQL statement box.
(BMC.DB2.SPE2210) Edit the SQL statement as needed:
Purpose
Action
Find a search string
- Click Find/Replace
.
- Enter the search string in the Search box.
- Click Find.
Find and replace a search string
- Click Find/Replace
.
- Enter the search string in the Search box.
- Enter the replacement string in the Replace box.
- Click Find.
- Click Replace.
Find and replace all instances of a search string
- Click Find/Replace
.
- Enter the search string in the Search box.
- Enter the replacement string in the Replace box.
- Click Replace All.
Make a search case sensitive
Select the Match case checkbox.
Enable syntax highlighting
Select the Use syntax highlighting for SQL statements Command Center option.
For more information, see Setting-Command-Center-options.
View SQL statement options
Click Show more.
Hide SQL statement options
Click Show less.
Undo an action
Click
to undo the last action.
Redo an action
Click
to cancel undoing the last action.
- Click Find/Replace
- Click Generate explain plan
.The Explain results are displayed along with the following tabs:
- SQL (see SQL-tab)
- Indexes (see Indexes-tab)
- Explain (see Explain-tab)
- Cost (see Cost-tab)
- Predicates (see Predicates-tab)
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*