这更像是一个理论问题 我有一个带有2个分区列的配置单元表,例如col1和col2 如果我写如下查询,我会利用分区的好处
select count(*) from table A where col1='A' and col2 > '1' and col2 < '6'
我认为执行时间不会比仅执行以下操作有很大差异
select count(*) from table A where col1='A'
我的第一个查询不能利用分区吗,有什么方法可以做到这一点?
答案 0 :(得分:1)
if you have high values of data then definitely the first query will give much better performance.
Also if you want to compare them I would suggest you run at least 3 time the same query and then calculate the average of them.
You make get some different because so many other jobs will run parallel, So might not get enough resource then first attempt will tale longer time. I mean say they so many reason.