oracle优化一则--不走索引

1、问题

一个查询未走索引,从一个视图中查询,视图定义为5张表的union all。
11

有明显的条件TMH12 = '1001271876'

我有几张阿里云幸运券分享给你,用券购买或者升级阿里云相应产品会有特惠惊喜哦!把想要买的产品的幸运券都领走吧!快下手,马上就要抢光了。

2、排查

@?/rdbms/admin/sqltrpt 脚本生成优化建议
通过建议来看,是生成索引的建议,对列进行格式转换,TO_CHAR("TMH12"),

1- Index Finding (see explain plans section below)

The execution plan of this statement can be improved by creating one or more
indices.

Recommendation (estimated benefit: 99.48%)

  • Consider running the Access Advisor to improve the physical schema design
    or creating the recommended index.
    create index HICANO_POS.IDX

20260001onHICANOPOS.ECPHPDA(TOCHAR("TMH12"));ConsiderrunningtheAccessAdvisortoimprovethephysicalschemadesignorcreatingtherecommendedindex.createindexHICANOPOS.IDX 20260001onHICANOPOS.ECPHPDA(TOCHAR("TMH12"));−ConsiderrunningtheAccessAdvisortoimprovethephysicalschemadesignorcreatingtherecommendedindex.createindexHICANOPOS.IDX

_20260002 on

HICANO_POS.E_CPXSDA(TO_CHAR("TMH12"));
  • Consider running the Access Advisor to improve the physical schema design
    or creating the recommended index.
    create index HICANO_POS.IDX

20260003onHICANOPOS.EJLZCPCPXXMXB("TMH8");ConsiderrunningtheAccessAdvisortoimprovethephysicalschemadesignorcreatingtherecommendedindex.createindexHICANOPOS.IDX 20260003onHICANOPOS.EJLZCPCPXXMXB("TMH8");−ConsiderrunningtheAccessAdvisortoimprovethephysicalschemadesignorcreatingtherecommendedindex.createindexHICANOPOS.IDX

_20260004 on

原文链接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值