Performance: CLEM Expressions
CLEM sequence functions (“@ functions”) that look back into the data stream must store enough of the data to satisfy the longest look-back. For operations whose degree of look-back is unbounded, all values of the field must be stored. An unbounded operation is one where the offset value is not a literal integer; for example, @OFFSET(Sales, Month). The offset value is the field name Month, whose value is unknown until executed. The server must save all values of the Sales field to ensure accurate results. Where an upper bound is known, you should provide it as an additional argument; for example, @OFFSET(Sales, Month, 12). This operation instructs the server to store no more than the 12 most recent values of Sales. Sequence functions, bounded or otherwise, almost always inhibit SQL generation.