7.4. 大范围扫描安全限制
大范围的匹配默认现在是有安全限制的,如果扫描的倒排表长度超过1万,就会报错提醒,意味着这个SQL应该优化了,如 ,1,a>=0,between 等这种涉及扫描范围的,就会经常遇到,如果是数值型,推荐采用tree类型规避这个问题。
select s1,s2,i1,l1 from common_example001 where partition like 'teststream' and s1='1' and s2='2' and l1>'2' limit 5;
当然如果特殊需要,可以通过下面的方法突破这个限制(也可以在服务器端配置),但切记尽量少用,会影响性能
select s1,s2,i1,l1 from common_example001 where partition like 'teststream' and s1='1' and s2='2' and l1>'2' and syskv='cl.query.multi.termquery.size:10000000' limit 5 ;