Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.52 KB

File metadata and controls

60 lines (44 loc) · 2.52 KB
title DBCC SHOWRESULTCACHESPACEUSED (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 07/03/2019
ms.prod sql
ms.technology data-warehouse
ms.reviewer
ms.topic language-reference
dev_langs
TSQL
ms.assetid 73f598cf-b02a-4dba-8d89-9fc0b55a12b8
author XiaoyuL-Preview
ms.author xiaoyul
monikerRange = azure-sqldw-latest || = sqlallproducts-allversions

DBCC SHOWRESULTCACHESPACEUSED (Transact-SQL)

[!INCLUDEtsql-appliesto-xxxxxx-xxxx-asdw-xxx-md]

Shows the storage space used result set caching for an Azure [!INCLUDEssSDW] database.

Topic link icon Transact-SQL Syntax Conventions (Transact-SQL)

Syntax

DBCC SHOWRESULTCACHESPACEUSED  
[;]  

Remarks

The DBCC SHOWRESULTCACHESPACEUSED command doesn't take any parameters and returns the space used by the database where the command is run.

The maximum size of result set cache is 1 TB per database. Azure SQL Data Warehouse automatically evicts entries in the result set cache:

  • every 48 hours if the result set hasn't been used.
  • when the result set cache approaches the maximum size.

Users can manually empty the result set cache for a database by turning OFF the result set cache feature or by using the DBCC DROPRESULTSETCACHE command. Pausing a database won't empty result set cache.

Permissions

Requires VIEW SERVER STATE permission.

Result Sets

Column Data Type Description
reserved_space bigint Total space used for the database, in KB. This number will change as the cached result set increases.
data_space bigint Space used for data, in KB.
index_space bigint Space used for indexes, in KB.
unused_space bigint Space that is part of the reserved space and not used, in KB.

See also

ALTER DATABASE SET Options (Transact-SQL)
ALTER DATABASE (Transact-SQL)
SET RESULT SET CACHING (Transact-SQL)
DBCC DROPRESULTSETCACHE (Transact-SQL)