How to determine if given table is memory optimized?

醉酒当歌 提交于 2021-01-29 03:08:17

问题


Good morning,

My first question is how to determine if tables created in MS SQL Server are memory optimized. I have some tables and I don't remember if some of them I created in-memory optimized or not.

Many thanks for answers.


回答1:


To riff off of another answer here, here's a way to get the status for all tables in your database:

select name, OBJECTPROPERTY(object_id,'TableIsMemoryOptimized')
from sys.tables;

Similarly, if you want just the in-memory ones, you could do:

select name
from sys.tables
where OBJECTPROPERTY(object_id,'TableIsMemoryOptimized') = 1;



回答2:


Select OBJECTPROPERTY(OBJECT_ID('schema.tablename'),'TableIsMemoryOptimized')



来源:https://stackoverflow.com/questions/58866622/how-to-determine-if-given-table-is-memory-optimized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!