部分选择行的Cassandra性能

时间:2021-11-06 04:29:59

If I have a cassandra table like the following

如果我有一个像下面这样的cassandra表

CREATE TABLE importantdata (
    a1 int,
    a2 int,
    a3 int,
    data1 blob,
    data2 blob,
    PRIMARY KEY (a1), a2, a3)
)

and then do a partial select

然后进行部分选择

SELECT a1, a2, a3, data1 FROM importantdata WHERE a1=0 and a2=1 and a3<0

does the size of excluded the blob data2 play a factor in the performance of the query?

排除blob data2的大小是否会影响查询的性能?

1 个解决方案

#1


On reads Cassandra will pull the whole row in memory, and sending back to the client (over the network) only the requested fields.

在读取时,Cassandra会将整行拉入内存,并仅将请求的字段发送回客户端(通过网络)。

So, the excluded field, will play a factor in the performance since it won't be sent it back to the client, but the Cassandra nodes will put the whole row in memory when the query is executed.

因此,排除字段将在性能中起作用,因为它不会将其发送回客户端,但Cassandra节点将在执行查询时将整行放入内存中。

Hope it helps,

希望能帮助到你,

Jose Luis

#1


On reads Cassandra will pull the whole row in memory, and sending back to the client (over the network) only the requested fields.

在读取时,Cassandra会将整行拉入内存,并仅将请求的字段发送回客户端(通过网络)。

So, the excluded field, will play a factor in the performance since it won't be sent it back to the client, but the Cassandra nodes will put the whole row in memory when the query is executed.

因此,排除字段将在性能中起作用,因为它不会将其发送回客户端,但Cassandra节点将在执行查询时将整行放入内存中。

Hope it helps,

希望能帮助到你,

Jose Luis