> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MissingRequiresConstraint validation rule

> Recommends adding requires constraints to optimize query performance. Identifies views where adding a constraint would improve query efficiency.

This rule identifies views that map to containers where adding a requires constraint
would improve query performance. The recommendation message indicates whether the
change is "safe" or requires attention to potential ingestion dependencies.

## Why it matters

Views without proper requires constraints may have poor query performance.
Adding requires constraints enables queries to perform under-the-hood optimizations.

## Example

View `Valve` maps to both containers `Valve` and `CogniteEquipment`.
A `requires` constraint from `Valve` to `CogniteEquipment` is likely needed
to enable efficient query performance.

## Further reading

* [Validation rules](/cdf/deploy/neat/validation/index)
