用户登录
用户注册

分享至

cassandra naud

  • 作者: 天荒19
  • 来源: 51数据库
  • 2020-09-30
象这样:
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
软件
前端设计
程序设计
Java相关