【问题标题】:How to Identify Candidate Tables for the new feature of SQL Server 2016 Stretch Databases?如何识别 SQL Server 2016 Stretch Databases 新功能的候选表?
【发布时间】:2015-09-11 05:01:45
【问题描述】:

SQL Server 2016 具有一项新功能,即拉伸数据库,可让您透明地归档历史数据。但我想知道哪些表适合此功能?

【问题讨论】:

    标签: sql-server sql-server-2016


    【解决方案1】:

    根据documentation

    什么样的数据库和表是 Stretch Database 的候选对象?

    Stretch Database 针对具有大量 历史数据,通常存储在少数表中。这些 表可能包含超过 10 亿行。

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

    使用 Stretch Database Advisor,这是 SQL Server 2016 升级的一项功能 顾问,用于识别 Stretch Database 的数据库和表。为了 更多信息,请参阅为 Stretch Database 识别数据库和表 通过运行 Stretch Database Advisor。

    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
    

    【讨论】:

    • 这个功能对临时表也有帮助吗?
    • 通常临时表被清空并重新加载。它没有“历史数据”,因为数据不会在其中停留很长时间。
    • 大部分限制都会消失。在印度 SSGAS 最近的一次演讲中,AlwaysOn。在下一个 CTP 版本中提到了始终加密和索引视图。查看每个 CTP 删除的发行说明,了解更多删除内容。
    猜你喜欢
    • 2017-05-26
    • 2017-02-13
    • 1970-01-01
    • 1970-01-01
    • 2018-12-24
    • 1970-01-01
    • 2011-12-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多