Based on the query plan, a SQL statement is classified according to the characteristics of the query plan. If the query plan is not retrieved successfully, then these SQL statements are classified as Invalid SQL. A SQL statement can be invalid if the database object it references does not exist, the database user does not have privileges to access it, or the incorrect database and user are used to scan the Job.
All valid SQL statements are further classified as Simple, Complex, or Problematic SQL statements.
Problematic SQL statements are potentially under performing SQL statements that should be optimized. Problematic SQL satisfy one of the following criteria:
The number of tables referenced in the query plan of a SQL statement exceeds the upper limit of the Complex table scan operations range.
Single full table scan with table size larger than the threshold size.
Single full table scan in a nested loop with table size larger than the threshold size.
The number of worktables is greater than or equal to the defined value if the With Worktable checkbox is selected in the Preferences window.
The number of reformatting.
Complex SQL statements are complicated SQL statements where there is room for improvement. Complex SQL satisfy one of the following criteria:
If the number of tables referenced in the query plan of an SQL statement falls into the Complex table scan operations range defined in the Preferences window.
SQL statements with full index scan.
Simple SQL statements are direct and straightforward SQL statements with minimal probability of improvement. SQL statements are defined as Simple SQL statements when number of tables referenced in the query plan is less than the lower limit of the Complex table scan operations range; the default value is 1 table.
SQL statements are classified as Problematic SQL if they meet any one of the following requirements:
Read-only field indicating the number of table operations references in the query plan. If the total number of table operation is greater than this value, then this SQL statement is classified as Problematic. This value is the same as the upper limit of the Complex table operations range.
Specify that SQL statements with full table scan are classified as Problematic SQL statements. This classification depends upon the size of the table or the number of row.
Table size (KBytes): (Default = 16, Range= 8 to 9,999,996)
Number of rows: (Default = 1000)
In the case of a temporary table where the size is unknown when the query plan is retrieved, any full table scan will be classified as problematic.
Note: Table size is calculated using sp_spaceused.
You can specify to include or exclude inserted or deleted simulation temp table created in the SQL Scanner Trigger Conversion by using the Including inserted simulation temp table and Including deleted simulation temp table checkboxes.
Specify whether SQL statements with a full table scan inside a nested loop are classified as Problematic SQL statements. This classification depends upon the size of the table or the number of row.
Table size (KBytes): (Default = 16, Range= 8 to 9,999,996)
Number of rows: (Default = 1000)
You can specify to include or exclude inserted or deleted simulation temp table created in the SQL Scanner Trigger Conversion by using the Including inserted simulation temp table and Including deleted simulation temp table checkboxes.
Specify that SQL statements involving the number of worktables greater than or equal to the defined number are classified as Problematic SQL statements.
Specify that SQL statements whose query plan uses reformatting are classified as Problematic SQL. Reformatting is the process of generating a worktable with a clustered index and performing a nested-loop join. The Adaptive Server optimizer may choose this strategy when the table is large and does not have any useful index for a join.
SQL statements are classified as Complex SQL if they meet any one of the following requirements and do not meet any requirement for being a Problematic SQL statement:
Number of table operations (Default = 2 /3, Range 2 to 99)
Specify the number of table references in the query plan for Complex SQL statements. Checkboxes are available to indicate whether you want the inserted and deleted simulated temp tables to be included in this table range.
You can specify to include or exclude inserted and deleted simulation temporary tables created in the SQL Scanner Trigger Conversion by using the Including inserted simulation temp table and Including deleted simulation temp table checkboxes.
With full index scan (Default = checked)
Specify whether SQL statements with full index scan are classified as Complex SQL statements.
SQL statements are classified as Simple SQL if they meet the following requirement and do not meet any requirement for being a Problematic SQL statement or a Complex SQL statement:
Number of table operations less than (Default = 2)
Read-only field indicating the number of table operations references in the query plan. If the total number of table operation is less than this value, then this SQL statement is classified as Simple. This value is the same as the lower limit of the Complex table operations range.
© ALL RIGHTS RESERVED. 이용 약관 개인정보 보호정책 Cookie Preference Center