简体   繁体   English

如何确定给定表是否经过 memory 优化?

[英]How to determine if given table is memory optimized?

Good morning,早上好,

My first question is how to determine if tables created in MS SQL Server are memory optimized.我的第一个问题是如何确定在 MS SQL 服务器中创建的表是否经过 memory 优化。 I have some tables and I don't remember if some of them I created in-memory optimized or not.我有一些表,我不记得我是否在内存中优化了其中一些表。

Many thanks for answers.非常感谢您的回答。

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;

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM