lng numeric
lat numeric
offsets_lng numeric
offset_lat numeric其中lng和lat我加了索引 我是这么加的:数据表右键--管理索引--新增--将lng和lat前面的对勾选上 其余默认我试了一下select count(lng) from aaaa 运行了2:27
select count(*) from aaa 运行了2:11请问这是怎么回事啊?我这么新建索引正确吗?数据表的结构合理吗?没有主键有关系吗?
lat numeric
offsets_lng numeric
offset_lat numeric其中lng和lat我加了索引 我是这么加的:数据表右键--管理索引--新增--将lng和lat前面的对勾选上 其余默认我试了一下select count(lng) from aaaa 运行了2:27
select count(*) from aaa 运行了2:11请问这是怎么回事啊?我这么新建索引正确吗?数据表的结构合理吗?没有主键有关系吗?
select count(*) from aaa 运行了2:11没什么多大的影响.除非加了条件。where不过这么大的表还是作分区表吧。是2005吧!
select count(*) from aaa
这俩条的执行计划是一样的
以下分区函数与上一个示例使用相同的 boundary_value [ ,...n ] 值,但它指定 RANGE RIGHT。 复制代码
CREATE PARTITION FUNCTION myRangePF2 (int)
AS RANGE RIGHT FOR VALUES (1, 100, 1000); 下表显示对分区依据列 col1 使用此分区函数的表如何进行分区。分区 1 2 3 4
Values
col1 < 1
col1 >= 1 AND col1 < 100
col1 >= 100 AND col1 < 1000
col1 >= 1000