标签:文件 table 创建文件 ble 建表 range filename ima 方案
SqlServer分区过程:
1、创建文件组
alter database testdb add filegroup [filegroup1]
2、创建文件组文件
alter database testdb add file (name=N‘file1‘, filename=N‘C:\db\data\file1.ndf‘, size=5MB, filegrowth=5MB) to filegroup [filegroup1]
3、创建分区函数
create partition function [func_order](orderId) as range left for values(0, 1000, 2000)
4、创建分区方案
create partition scheme [schema_order] as partition [func_order] to ([PRIMARY], [filegroup1])
5、在分区方案下创建表
create table [dbo].[order]( [orderId] bigint not null, [quantity] int ) on schema_order(orderId)
6、在分区方案下创建索引
CREATE CLUSTERED INDEX [ClusteredIndex_on_schema_order] ON [dbo].[order] ( [orderId] )WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [func_order]([orderId])
标签:文件 table 创建文件 ble 建表 range filename ima 方案
原文地址:http://www.cnblogs.com/anxiao/p/7199096.html