Clear Procedure Cache in SQL Azure database

Clear Procedure Cache in SQL Azure database

When we were working on performance baseline or performance improvement we might be clearing down the procedure cache to get the exact statistics of the stored procedure. Many of them are already aware how to do it in hosue SQL Server. We might be using anyone of the below command to clear the procedure cache.

  • DBCC FREESYSTEMCACHE
  • DBCC FREEPROCCACHE
  • DBCC FLUSHPROCINDB

If you are working with SQL Azure then above commands wont work to clear down the plan or procedure cache.

Microsoft added new TSQL statement in SQL Azure database as well as in SQL Server 2016 you can use the below command to clear out the procedure cache. Clear the procedure cache , run the procedure again to get the statistics.

ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE ;

Supported in

  • SQL Azure database
  • SQL Server 2016 and Above

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*


x

Related Posts

Provisioning Azure Cosmos DB using Powershell
Azure Cosmos database is one of the NoSQL database that is available in Microsoft Azure cloud platform. Azure Cosmos db is getting more popular c...
Query Editor - Azure Portal
An interesting new tool (in preview) added to Azure SQL database. Now Azure portal provides flexibility to query azure sql database from a browse...
SQL Server 2016 - Drop \ Disable Database \ Table Stretch Feature
It's been a week I was playing around this new feature. Now I'm going to drop\disable this feature so save some $ in my Azure subscription :-) D...
powered by RelatedPosts