在Cassandra列中使用camelCase的性能影响 [英] Performance impact in using camelCase in Cassandra columns

查看:50
本文介绍了在Cassandra列中使用camelCase的性能影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,Cassandra通常会将所有列名都转换为小写。

I know, Cassandra generally converts all the column names into lowercase.

在Cassandra的列名中使用camelCase是否会对性能产生影响?

Is there a performance impact in using the camelCase in column names in Cassandra?

我在列中使用了双引号,并且能够将列名存储在camelCase中,如下所示

I used the double quote in columns and I am able to store the column names in the camelCase, like below

CREATE TABLE test (
  Foo int PRIMARY KEY,
  "Bar" int
);

用双引号存储列名是否会对性能产生影响?

Will there be a performance impact in storing the column name with the double quotes?

推荐答案

我不认为会产生影响。我要说的是,CQL的不区分大小写的性质仅用于简化查询,如您从以下答案中看到的: https:/ /stackoverflow.com/a/28447941/824644

I don't believe there's an impact. I would say that the case-insensitive nature of CQL only serves the purpose of simplifying queries, as you can see from this answer: https://stackoverflow.com/a/28447941/824644

此外,由于倾向于使用小骆驼案,因此似乎有这种动机Java(使用Cassandra编写的语言)。请参阅此GitHub问题中的讨论: https://github.com/reuzel/CqlSharp/issues/ 28

Also, it seems that there was a motivation for this behavior due to the preference of lower camel case in Java (which is the language in which Cassandra is written in). See the discussion in this GitHub issue: https://github.com/reuzel/CqlSharp/issues/28

这篇关于在Cassandra列中使用camelCase的性能影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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