象这样:
update keyspace XXX with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:3};
其中的simpleStrategy是replication策略之一,replication_factor是这种策略下的备份数。当然,除了update之外,在创建keyspace的时候就可以指定策略。
select o.name as "table name", i.rowcnt as "row count"
from sysobjects o, sysindexes i
where i.id = o.id
and i.indid in(0,1)
and o.xtype = 'u' --只统计用户表
and o.name <> 'sysdiagrams'
order by i.rowcnt desc --按行排降序
compute sum(i.rowcnt), count(o.name); --汇总行数,表数
go
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....