--查看分区及分区范围的情况select * from sys.partitions where object_id = object_id('SecureUsbLog');select * from sys.partition_range_values;--查看分区架构情况select * from sys.partition_schemes;--查看某一特定分区列值属于哪个分区select M2.$
--查看分区及分区范围的情况
select * from sys.partitions where object_id = object_id('SecureUsbLog');
select * from sys.partition_range_values;
--查看分区架构情况
select * from sys.partition_schemes;
--查看某一特定分区列值属于哪个分区
select M2.$partition.Part_mediasec_func('20150325') as partition_num;
--查看某一特定分区的记录
select * from SecureUsbLog where M2.$partition.Part_mediasec_func(logTime) = 3
--查看各分区所包含的记录数
select $partition.Part_mediasec_func(logTime) as partition_num,
count(*) as record_num
from SecureUsbLog
group by $partition.Part_mediasec_func(logTime)
order by $partition.Part_mediasec_func(logTime);
这部分