sp_query_store_flush_db (Transact-SQL)

APPLIES TO: yesSQL Server (starting with 2016) yesAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

Flushes the in-memory portion of the Query Store data to disk.

Topic link icon Transact-SQL Syntax Conventions

Syntax


sp_query_store_flush_db [;]  

Return Code Values

0 (success) or 1 (failure)

Remarks

Permissions

Requires the EXECUTE permission on the database, and DELETE permission on the query store catalog views.

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