This topic describes the diagnostic items of the SQL review feature.
| Diagnostic item | Description |
|---|---|
| Too many partitions involved | During SQL execution, too many partitions are involved in the calculation, wasting system resources. |
| Predicate calculus | The WHERE clause contains column calculation, and the index cannot take effect. |
| Prefix fuzzy match | Prefix fuzzy match is specified by like "%xxx" or like "%xxx%", and the index cannot take effect. |
Too many in conditions |
Too many in conditions exist. We recommend that you use no more than 200 in conditions, for example, in(?,?,?..). |
| Too many table connections | Too many table connections exist. We recommend that you use no more than 10 table connections. Otherwise, no optimal plan is available after pruning. |
No not null constraint in the not in clause |
The not in clause must contain the not null constraint to avoid nested loop join. |
| Identically true WHERE condition | The UPDATE or DELETE statement does not contain the WHERE condition, or the WHERE condition is identically true. |
Use of the not in clause |
We recommend that you use the not in clause with caution. It involves special logic for processing null values, and the semantics are difficult to control. |
| INSERT/REPLACE statement without fields | We recommend that you do not use the INSERT or REPLACE statement without fields. |
| UPDATE/DELETE/SELECT statement without index key | The UPDATE, DELETE, or SELECT statement does not contain an index key, resulting in a full table scan. |
| Operation on a partitioned table without a partitioning key | The operation on the partitioned table does not contain a partitioning key, and thus partitions cannot be pruned. |
| Too many indexes | Too many indexes exist, which are redundant. |
| Column data skew | Data skew occurs in the column specified in the WHERE clause. |
| Global/Local keyword not specified | When you create an index, you must manually specify the Global or Local keyword. We recommend that you use a local index. |
| Too many table fields | Too many table fields exist. |