Eliminating Common Sub-Expressions - Intergraph Smart Materials - Version 10.2 - Administration & Configuration - Hexagon

Intergraph Smart Materials Classic Administration (10.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Administration & Configuration
Smart Materials/Smart Reference Data Version
10.2

On the A.60.06 screen, another scenario that allows significant performance improvements is to use IN-List operators in a single comparison record instead of multiple OR-combined comparisons.

For example, the following condition:

(CG_GROUP_CODE = 'X' OR
CG_GROUP_CODE = 'Y' OR
CG_GROUP_CODE = 'Z')

can be substituted with this condition:

CG_GROUP_CODE IN ('X', 'Y', 'Z')

In the first example, three incarnations of the same table are created in a three-way join. This type of comparison clearly cannot perform as well as the comparison defined in the second example where the table is translated directly into a SQL IN-List expression.