You can generate a report with the SQL statements in the SQL Scanner window. The contents of the report depend on the components you select.
Select Report | Scanned SQL to open the Scanned SQL Report Criteria window.
Select the components for the report.
Select All SQL or Select SQL and enter the specific SQL statement numbers.
Click OK to generate the report. The information in the report can be saved and printed.
Note: A few minutes may be needed to generate a long report.
To save the abstract plan from the SQL Scanner to the database
Click .
In the Save to group drop-down field, select the group where you want to store your abstract plan.
Click Save.
When the Abstract Plan is saved, it is only saved for the user that you are logged on as. In order for another user to use this abstract plan, you must export/import the plan to another user.
At the prompt "Plan has been created successfully. The id is nnnnnnnnnn". Click OK. The abstract plan is saved in Adaptive Server.
Notes:
Adaptive Server saves the abstract plan in the sysqueryplans system table. When a query is executed, Adaptive Server looks in the sysqueryplans table for a stored SQL text that matches the query. If a match is found, the saved abstract plan is used to execute the query.
Saving the abstract plan onto the database means that when the same SQL statement is executed, the query plan is based on the abstract plan.
Here are some examples you need to be aware of:
Spaces in between functions
where substring ( EMP_NAME, 1, 5 ) = 'SMITH'
This is not the same as
where substring(EMP_NAME,1,5) = 'SMITH'
Spaces in between database, scheme and object name
from sqlexp . sqlexp . EMPLOYEE
This is not the same as
from sqlexp.sqlexp.EMPLOYEE
Parameter replacement
where EMP_ID = @var_a
This is not the same as
if @var_a = 56
where EMP_ID = 56
Comments
where EMP_ID =123 /* comment */
This is not the same as
where EMP_ID = 123
All the SQL statements can be saved in a text file from the SQL Scanner, the SQL Repository, the SQL Inspector, and the SQL Optimizer windows. These SQL statements can then be imported into Benchmark Factory 4.6 or later.
To create a file to import into Benchmark Factory
Right-click and select Create Benchmark Factory Import File.
Select the specific SQL statements that you want to save.
Enter the filename and select the file location.
Below is a list of available functions within the SQL Scanner window.
Button or Menu | Function |
Group & Right-click Menu
|
|
Group & Right-click Menu |
|
Group Menu |
|
Group Menu |
|
Group Menu |
|
Group Menu |
|
Group Menu
|
|
Job Menu
|
|
Job Menu |
|
Job Menu |
|
SQL & Right-click Menu |
|
SQL & Right-click Menu |
|
SQL & Right-click Menu |
|
SQL Menu
|
|
SQL Menu |
|
SQL Menu |
|
Report Menu |
|
Report Menu |
|
Navigate Menu
|
|
Navigate Menu |
|
View Menu |
|
View Menu |
|
View Menu |
|
View Menu |
|
View Menu |
|
View Menu |
|
View Menu |
|
Edit Menu
|
|
Edit Menu
|
|
Edit Menu
|
|
File Menu |
|
Right-click Menu |
|
Right-click Menu |
|
Right-click Menu |
|
Right-click Menu |
|
Right-click Menu |
View (Large Icons/ Small Icons/ List/ Details) |
Right-click Menu |
|
Right-click Menu |
|
Right-click Menu |
|
Right-click Menu |
Save |
Right-click Menu |
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center