WHERE flightdate BETWEEN DATE '2019-10-01' AND 2019-11-05'
AND origin = 'BOS';
在没有索引的情况下,
Presto
会从
Accumulo
中读取整个数据集,然后在
Presto
内部进行
过滤。要读取的
Accumulo
范
围被分配给各个工作节点,这里的范围是整个
tablet
的范围。
如果有索引(如表
7-3
中的示例索引)
,处理范围的数量就可以大大减少。
表7-3:航班表上的索引示例
2019-08-10flightdate_flightdate:2232[]
2019-10-19flightdate_flightdate:2232 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.