# Too complex query

Discover the solution for queries that exceed the maximum length.

If you see the error message below, the [CQL query](/reference/cql) you are trying to [evaluate](/reference/sdk/javascript/api/plug/evaluate) is longer than the maximum of **500 characters**.

> **Error**
>
> The query is too complex.

To resolve it, reduce the query size by:

- **Simplifying the expression** — remove redundant conditions and use shorter [CQL](/reference/cql) equivalents.
- **Splitting the logic** — break the query into smaller [evaluations](/reference/sdk/javascript/query-evaluation) and combine the results in your code.
- **Passing data through the context** — provide precomputed values via the [evaluation context](/reference/sdk/javascript/api/plug/evaluate) instead of encoding them in the query.
