sp_query_store_flush_db (Transact-SQL)
Applies to:
SQL Server 2016 (13.x) and later
Azure SQL Database
Azure SQL Managed Instance
Flushes the in-memory portion of the Query Store data to disk.
Transact-SQL Syntax Conventions
Syntax
sp_query_store_flush_db [;]
Return Code Values
0 (success) or 1 (failure)
Remarks
Permissions
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_remove_query (Transact-SQL)
sp_query_store_unforce_plan (Transact-SQL)
sp_query_store_reset_exec_stats (Transact-SQL)
sp_query_store_remove_plan (Transct-SQL)
sp_query_store_reset_exec_stats (Transact-SQL)
Query Store Catalog Views (Transact-SQL)
Monitoring Performance By Using the Query Store