CareySon 发表于 2013-1-4 01:28:22

表分区的阴暗面

<div id="cnblogs_post_body">    本篇文章是我在:http://www.simple-talk.com/sql/database-administration/partitioned-tables,-indexes-and-execution-plans-a-cautionary-tale/?utm_source=simpletalk&utm_medium=email-main&utm_content=partitionedtables-20121029&utm_campaign=SQL看到了,如我们所知,大家在介绍表分区的时候一直在歌颂其好处。但一句古谚语说的好,每个人都有其阴暗面,表分区也会在特定情况下反而降低其性能。
 
例子

    首先建立测试表,并在其上建立聚集索引:
<div style="border-bottom: green 1px dashed; border-left: green 2px solid; padding-bottom: 1px; margin-top: 5px; padding-left: 1px; padding-right: 1px; margin-left: 15px; border-top: green 1px dashed; border-right: green 1px dashed; padding-top: 1px; margin-buttom: 5px">   CREATE TABLE dbo.Orders    (      Id INT NOT NULL ,      OrderDate DATETIME NOT NULL ,      DateModified DATETIME NOT NULL ,      Placeholder CHAR(500)      NOT NULL      CONSTRAINT Def_Data_Placeholder DEFAULT 'Placeholder',    );GOCREATE UNIQUE CLUSTERED INDEX IDX_Orders_IdON dbo.Orders(ID);GO
页: [1]
查看完整版本: 表分区的阴暗面