Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions data-explorer/kusto/query/materialize-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ The `materialize()` function is useful in the following scenarios:
> Materialize has a cache size limit of **5 GB**. This limit is per cluster node and is mutual for all queries running concurrently. If a query uses `materialize()` and the cache can't hold any more data, the query will abort with an error.

>[!TIP]
> Another way to perform materialization of tabular expression is by using the `hint.materialized` flag
> of the [as operator](as-operator.md) and [partition operator](partition-operator.md). They all share a
> single materialization cache.

>[!TIP]
>
>* Another way to perform materialization of tabular expression is by using the `hint.materialized` flag of the [as operator](as-operator.md) and [partition operator](partition-operator.md). They all share a single materialization cache.
>* Push all possible operators that reduce the materialized dataset and keep the semantics of the query. For example, use common filters on top of the same materialized expression.
>* Use materialize with join or union when their operands have mutual subqueries that can be executed once. For example, join/union fork legs. See [example of using join operator](#examples-of-query-performance-improvement).
>* Materialize can only be used in let statements if you give the cached result a name. See [example of using let statements](#examples-of-using-materialize)).

>[!CAUTION]
> Benchmark your queries with and without materialize() to see if it improves performance for your data and query patterns. In some cases, materialize() can increase memory usage without providing significant performance gains, so testing helps you choose the best approach.

## Examples of query performance improvement

The following example shows how `materialize()` can be used to improve performance of the query.
Expand Down