1、 LRN1427Whats New in the Oracle Optimizer?Oracle AI Database 26aiNigel BaylissOptimizer Product ManagerWhats New in the Oracle Optimizer2Copyright 2025,Oracle and/or its affiliates|123456SQL Analysis ReportSQL Diagnostic ReportSQL Plan ManagementAutomatic Error MitigationOptimizer Support for AI Vec
2、tor IndexesOther Optimizer-related EnhancementsSQL Analysis ReportHelping developers write better queriesSQL Analysis ReportingPoorly-formed SQL statements can inadvertently Prevent accurate cardinality estimates(leading to compromised execution plan selection)Prevent the use of optimized access pat
3、hs(such as an index)Missing table joins,leading to Cartesian products(sometimes fixed with SELECT DISTINCT!)Implicit type conversionsProblems like this can be easy to miss Thousand-line SQL statements Many table joins The not so obvious,for example LIKE%mystring%instead of LIKE mystring%4Copyright 2
4、025,Oracle and/or its affiliates|SQL Analysis ReportCopyright 2025,Oracle and/or its affiliates|5select t1.p_category,t2.tpmethod from products t1,products t2where t1.prod_category|_1=SFD_1and t2.method_typ!=SEAunionselect t3.p_category,t4.tpmethodfrom products t3,sources t4where t3.scid=t4.scid and
5、 t4.carrier =AACand t4.s_area =1;The query block has 1 cartesian product which may beexpensive.Consider adding join conditions or removing thedisconnected tables or views.The query block contains UNION which may be expensive.Consider using UNION ALL if duplicates are allowed oruniqueness is guarante
6、ed.The following columns have predicates which preclude theiruse as keys in index range scan.Consider rewriting thepredicates.PROD_CATEGORYThe following columns have predicates which preclude theiruse as keys in index range scan.Consider rewriting thepredicates.METHOD_TYPThe following columns have p