我有一个表(data_table),其中包含多个分区列年/月/月键。
目录看起来像year=2017/month=08/monthkey=2017-08/files.parquet
下面哪个查询会更快?
select count(*) from data_table where monthkey='2017-08'
或者
select count(*) from data_table where monthkey='2017-08' and year = '2017' and month = '08'
我认为在第一种情况下 hadoop take 查找所需目录所需的初始时间会更多。但想确认一下