NOT ENFORCED informational constraints

Defining numerous constraints can require a considerable amount of system resources to enforce those constraints during INSERT and UPDATE operations. If an application is coded with data validation, it may be more efficient to create NOT ENFORCED informational constraints rather than creating other constraints. The NOT ENFORCED informational constraint will not enforce the constraint during data INSERT or UPDATE operations, however the Db2 optimizer will evaluate the information which is provided by the NOT ENFORCED informational constraint when considering the best access path to resolve a query.

The following diagram illustrates how to use the NOT ENFORCED informational constraint:

How to use the ...

Get IBM Db2 11.1 Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.