MYSQL:
使用 关键字 force
select * from table_name force index (index_name) where conditions;
ORACLE:
oracle指定索引语法: /*+index(t ind_name)*/
“t”: 为表的别名, 如果查询语句中有表别名,这里必须使用表别名, 如果没有表别名,则直接使用表名
“ind_name”: 要使用的索引名称。
MYSQL:
使用 关键字 force
select * from table_name force index (index_name) where conditions;
ORACLE:
oracle指定索引语法: /*+index(t ind_name)*/
“t”: 为表的别名, 如果查询语句中有表别名,这里必须使用表别名, 如果没有表别名,则直接使用表名
“ind_name”: 要使用的索引名称。