Operating Systems

• A user-defined function

• A sequence reference

• A host variable

• A parameter marker

• A special register

• A CASE expression

• An OLAP specification.

Always check the DB2 SQL Reference (SC18-9854) for the correct syntax and additional coding restrictions. If this is a feature you think you can benefit from, keep an eye open for maintenance. Recently, APAR PK74378 extended index on expression to casting data types TIMESTAMP, DATE, and TIME.

Nothing is ever free and index on expression is no exception. If you take advantage of this feature, you could incur extra cost for SQL INSERTs and UPDATEs that affect the index. You also could see the cost increase for running the LOAD, REBUILD INDEX, CHECK INDEX, and REORG TABLESPACE. However, you shouldn’t see additional cost for running a REORG INDEX because expressions are evaluated at INSERT or REBUILD INDEX time.

Index on expression is available only after you’ve upgraded your DB2 9 subsystem to NFM.

6 Pages