0
在卡桑德拉數據庫我嘗試使用標記功能日期類型的分區鍵列上的範圍查詢,但我得到不正確的結果。我打算在2016-09-09之後獲得記錄,但我也獲得了2016-09-07的記錄。cassandra分區鍵上的令牌如何工作?
卡桑德拉版本:2.1.8 CQL版本:3.0
下面請參閱我的查詢,讓我知道如果我做錯什麼
[email protected]:mydb> select updated_on_day,updated_on from sample_data where token(updated_on_day) > token('2016-09-09') and token(updated_on_day) < token('2016-11-11') limit 10;
updated_on_day | updated_on
--------------------------+--------------------------
2016-09-14 00:00:00+0530 | 2016-09-14 11:53:03+0530
2016-09-14 00:00:00+0530 | 2016-09-14 14:26:58+0530
2016-09-14 00:00:00+0530 | 2016-09-14 15:30:48+0530
2016-09-14 00:00:00+0530 | 2016-09-14 16:01:56+0530
2016-09-07 00:00:00+0530 | 2016-09-07 12:36:36+0530
閱讀此https://docs.datastax.com/en/cql/3.1/cql/cql_using/paging_c.html –
爲什麼不使用timeuuid? – questionare
謝謝@AshrafulIslam該鏈接解釋了這一切。 –