Query expressions for fragment elimination
A query expression (the expression in the WHERE clause) can consist of simple expressions, not simple expressions, and multiple expressions.
The database server considers only simple expressions or multiple simple expressions combined with certain operators for fragment elimination.
A simple expression consists of the following parts:
column operator value
- Simple Expression Part
- Description
- column
- Is a single column name
The database server supports fragment elimination on all column types except columns that are defined with the NCHAR, NVARCHAR, BYTE, and TEXT data types.
- operator
- Must be an equality or range operator
- value
- Must be a literal or a host variable
The following examples show simple expressions:
name = "Fred"
date < "08/25/2008"
value >= :my_val
The following examples are not simple expressions:
unitcost * count > 4500
price <= avg(price)
result + 3 > :limit
The database server considers two types of simple expressions
for fragment elimination, based on the operator:
- Range expressions
- Equality expressions