Azure SQL Database Size - plan_persist_plan internal table

We have a problem with Azure SQL databases as they increase in size, mainly because of one internal system table - plan_persist_plan.

In one of the databases with a total size of 400 MB, the plan_persist_plan table is 310Mb , and the rest are mainly users of tables and indexes.

We calculate the size of the database with the following query:

SELECT sum(reserved_page_count)*8.0/1024 FROM sys.dm_db_partition_stats 

To find out the size of each object, we use:

SELECT OBJECT_NAME(object_id), reserved_page_count*8.0/1024, * FROM sys.dm_db_partition_stats order by reserved_page_count desc

Can someone explain:

  • Is the purpose of this table plan_persist_plan?
  • How can we control its size and possibly reduce it?
+4
1

, plan_persist_plan Query Store. Query Store , . Query Store, , , . Query Store, plan_persist_plan . Query Store .

, . 100 . , , 300 .

, :

ALTER DATABASE MyDB SET QUERY_STORE CLEAR;

.

+1

Source: https://habr.com/ru/post/1606442/


All Articles