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

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

问题描述

我需要性能和查询方面的详细信息,我从一些站点了解到,在使用列族时只能给出一个键,如果是这样,你对我的键空间有什么建议,我需要使用 group by、order by、count、sum、ifnull、concat、joins 和有时嵌套查询.

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.

推荐答案

回答你最初提出的问题:列族和表是一回事.

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

如果您需要像您所说的那样使用分组依据、排序依据、计数、求和、ifnull、concat、连接和有时嵌套查询",那么您可能不想使用 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 中创建表和创建列族有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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