1
我無法弄清楚如果我有log_date(格式:2015-02-20 00:00:00 + 0000)列的非常大的表中的最舊和最新的行表。獲取表格的最舊和最新的行
我曾嘗試以下變化:
select account_id, log_date FROM my.table where log_date<'2013-03-20 00:00' limit 1 allow filtering;
ReadTimeout: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}
select account_id, log_date from my.table order by log_date desc limit 1;
InvalidRequest: code=2200 [Invalid query] message="ORDER BY is only supported when the partition key is restricted by an EQ or an IN."
我怎樣才能得到最古老和龐大的表的最新行?