oracle语句如何强制走索引

oracle语句如何强制走索引
最新回答
指名的幸福

2022-06-11 07:15:09

在select
后面加上
/*+index(索引列
索引名)*/
进行查询
例子:
create
index
idx_tt
on
tt(id);创建索引
select
*
from
tt;查询tt表
select
/*+index(tt
idx_tt)*/
*
from
tt;提示oracle走索引查询tt表