Share via


USE_CACHED_RESULT

Applies to: check marked yes Databricks SQL

The USE_CACHED_RESULT configuration parameter controls whether the session caches results sets which meet certain restrictions. If a query is re-submitted and the underlying tables have not changed, Databricks SQL can re-use the result set, reducing query execution cost.

You can set this parameter at the session level using the SET statement.

The system default for this setting is TRUE.

Examples

> SET use_cached_result = true;

> SELECT count(1) FROM T;

-- Re-use the result from the previous query
> SELECT count(1) FROM T;