Cassandra下的Rang查詢

2021-06-21 01:18:21 字數 344 閱讀 8529

1、第乙個key不能使用range,只能用in 或者等於

2、一般的,在對後面的key做range查詢,這個key前面的key,必須用等於限定,否則效率非常低。

比如 primary key (user_id int ,logtime int);

select * from userlog where logtime>1000 allow filtering; 效率可能非常低

select * from userlog where user_id=1 and logtime>1000;正常的range查詢

select * from userlog where logtime >1000; 不允許

有關cassandra的儲存引擎

cassandra使用乙個類似於日誌結構的結合樹 log structured merge tree 的儲存結構,不像傳統關聯式資料庫那樣使用b tree。cassandra會避免在寫之前去讀。寫前讀 read before write 特別是在乙個大的分布式系統裡,會對讀效能產生影響,還會帶來其它...

MariaDB的Cassandra儲存引擎

mariadb已經宣布了cassandra儲存引擎的乙個預覽版本。該外掛程式允許mariadb通過標準sql語法使用cassandra集群。u0026 xd n mariadb並不是第一款為cassandra提供sql支援的產品。例如,simba提供了乙個cassandra odbc驅動,可用於大多...

MariaDB的Cassandra儲存引擎

mariadb已經宣布了cassandra儲存引擎的乙個預覽版本。該外掛程式允許mariadb通過標準sql語法使用cassandra集群。mariadb並不是第一款為cassandra提供sql支援的產品。例如,simba提供了乙個cassandra odbc驅動,可用於大多數的odbc相容工具。...