在Cassandra中创建表和创建columnfamily有什么区别? [英] What's the difference between creating a table and creating a columnfamily in Cassandra?

查看:978
本文介绍了在Cassandra中创建表和创建columnfamily有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从性能和查询方面的细节,我从一些网站了解到,在使用columnfamily时只能提供一个键,如果是这样的话,我建议为我的键空间,我需要

I need details from both performance and query aspects, I learnt from some site that only a key can be given when using a columnfamily, if so what would you suggest for my keyspace, I need to use group by, order by, count, sum, ifnull, concat, joins, and some times nested queries.

推荐答案

要回答问题,请使用group by,order by,count,sum,ifnull,concat,

To answer the original question you posed: a column family and a table are the same thing.

  • The name "column family" was used in the older Thrift API.
  • The name "table" is used in the newer CQL API.

有关API的详细信息,请访问:
http://wiki.apache.org/cassandra/API

More info on the APIs can be found here: http://wiki.apache.org/cassandra/API

如果您 需要使用group by,order by,count,sum,ifnull,concat,join和某些时候嵌套查询,因为你的状态,那么你可能不想使用Cassandra,

If you need to use "group by,order by,count,sum,ifnull,concat ,joins and some times nested querys" as you state then you probably don't want to use Cassandra, since it doesn't support most of those.

CQL支持 COUNT ,但最多只能支持10000.它支持 ORDER BY ,但仅限于集群键。您提到的其他内容都不受支持。

CQL supports COUNT, but only up to 10000. It supports ORDER BY, but only on clustering keys. The other things you mention are not supported at all.

这篇关于在Cassandra中创建表和创建columnfamily有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆