首页 > 数据库 > > 使用Plan Hint进行调优-Scan方式
指明scan使用的方法,可以是tablescan、indexscan和indexonlyscan。
[no] tablescan|indexscan|indexonlyscan(table [index])参数说明
说明:对于indexscan或indexonlyscan,只有hint的索引属于hint的表时,才能使用该hint。
scan hint支持在行列存表、hdfs内外表、obs表、子查询表上指定。对于hdfs内表,由主表和delta表组成,delta表对用户不可见,故hint仅作用在主表上。
explain
select /*+ indexscan(item i) */ i_product_name product_name ...
该hint表示:item表使用索引i进行扫描。生成计划如下所示:

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3124146/ ,如需转载,请注明出处,否则将追究法律责任。