sp_query_store_flush_db (Transact-sql) sp_query_store_flush_db (Transact-SQL)

适用于:Applies to: 是SQL Server 2016 (13.x)SQL Server 2016 (13.x)yesSQL Server 2016 (13.x)SQL Server 2016 (13.x) 及更高版本 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance适用于:Applies to: 是SQL Server 2016 (13.x)SQL Server 2016 (13.x)yesSQL Server 2016 (13.x)SQL Server 2016 (13.x) and later 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance

将查询存储数据的内存中部分刷新到磁盘。Flushes the in-memory portion of the Query Store data to disk.

主题链接图标 Transact-SQL 语法约定Topic link icon Transact-SQL Syntax Conventions

语法Syntax

  
sp_query_store_flush_db [;]  

返回代码值Return Code Values

0(成功)或 1(失败)0 (success) or 1 (failure)

备注Remarks

权限Permissions

要求对数据库具有 ALTER 权限。Requires the ALTER permission on the database.

示例Examples

下面的示例将查询存储数据的内存中部分刷新到磁盘。The following example flushes the in-memory portion of the Query Store data to disk.

EXEC sp_query_store_flush_db;  

另请参阅See Also

sp_query_store_force_plan (Transact-sql) sp_query_store_force_plan (Transact-SQL)
sp_query_store_remove_query (Transact-sql) sp_query_store_remove_query (Transact-SQL)
sp_query_store_unforce_plan (Transact-sql) sp_query_store_unforce_plan (Transact-SQL)
sp_query_store_reset_exec_stats (Transact-sql) sp_query_store_reset_exec_stats (Transact-SQL)
sp_query_store_remove_plan (Transct-SQL) sp_query_store_remove_plan (Transct-SQL)
sp_query_store_reset_exec_stats (Transact-sql) sp_query_store_reset_exec_stats (Transact-SQL)
查询存储目录视图 (Transact-sql) Query Store Catalog Views (Transact-SQL)
使用查询存储来监视性能Monitoring Performance By Using the Query Store