如何为SQL Server 2016 Stretch数据库的新功能标识候选表?

问题描述:

SQL Server 2016有一个新功能,即弹性数据库,允许您透明地存档历史数据。但我想知道哪些表是这个功能的好选择?如何为SQL Server 2016 Stretch数据库的新功能标识候选表?

根据documentation

什么样的数据库和表候选人拉伸数据库?

延伸数据库针对具有大量 历史数据的事务数据库,通常存储在少量表中。这些 表可能包含10亿多行。

SQL Server 2016 Community Technology Preview 2(CTP2),Stretch 数据库迁移整个表。这假设您已经将 历史数据移动到与当前数据分开的表中。

使用Stretch Database Advisor,SQL Server 2016的一项功能升级 Advisor,用于识别伸展数据库的数据库和表。有关 的更多信息,请参阅通过运行Stretch Database Advisor来为Stretch Database 标识数据库和表。

Stretch Database Advisor

Current limitation(可能在将来的改变):

表属性

More than 1,023 columns 

    More than 998 indexes 

    Tables that contain FILESTREAM data 

    FileTables 

    Replicated tables 

    Tables that are actively using Change Tracking or Change Data Capture 

    Memory-optimized tables 

    You can't enable Stretch for a table that has a column named [batchID--N] 
    or an index named [idx--batchID--N] where N is the object ID of the table. 

数据类型和列属性

timestamp 

    sql_variant 

    XML 

    geometry 

    geography 

    hierarchyid 

    CLR user-defined types (UDTs) 

    Columns that are Always Encrypted 

列类型

COLUMN_SET 

    Computed columns 

约束

Check constraints 

    Foreign key constraints that reference the table 

    Default constraints 

指标

XML indexes 

    Full text indexes 

    Spatial indexes 

    Clustered columnstore indexes 

    Indexed views that reference the table 
+1

将这一功能也可用于临时表有用吗? –

+1

通常临时表被清空并重新加载。它没有“历史数据”,因为数据不会保留很长时间。 –

+1

大多数限制将消失。在印度的SSGAS最近的一次演讲中,AlwaysOn。在下一个CTP版本中,总是提到加密和索引视图。查看每个CTP版本的发行说明以获取更多清除。 – SQLmojoe