| description | SET RESULT_SET_CACHING (Transact-SQL) | |
|---|---|---|
| title | SET RESULT_SET_CACHING (Transact-SQL) | Microsoft Docs | |
| ms.custom | ||
| ms.date | 04/16/2020 | |
| ms.prod | sql | |
| ms.prod_service | sql-data-warehouse | |
| ms.reviewer | jrasnick | |
| ms.technology | t-sql | |
| ms.topic | reference | |
| f1_keywords | ||
| dev_langs |
|
|
| helpviewer_keywords | ||
| author | XiaoyuMSFT | |
| ms.author | xiaoyul | |
| monikerRange | =azure-sqldw-latest |
[!INCLUDE asa]
Controls the result set caching behavior for the current client session.
Applies to [!INCLUDEssSDW]
Transact-SQL Syntax Conventions
SET RESULT_SET_CACHING { ON | OFF };
[!INCLUDEsynapse-analytics-od-unsupported-syntax]
Run this command when connected to the user database where you want to configure the result_set_caching setting for.
ON
Enables result set caching for the current client session. Result set caching cannot be turned ON for a session if it is turned OFF at the database level.
OFF
Disable result set caching for the current client session.
Query the result_cache_hit column in sys.dm_pdw_exec_requests with a query’s request_id to see if this query was executed with a result cache hit or miss.
SELECT result_cache_hit
FROM sys.dm_pdw_exec_requests
WHERE request_id = 'QID58286'Requires membership in the public role