Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8940

Re: Why is this VELO search slower with TREX on? SQL looks more efficient...?

$
0
0

Hi Ross,

the limited execution plan via ST05 is not enough. However the following is a little bit of speculation, but the best we can do with the provided information right now.

 

We would need at least the access / filter predicates and the run time statistics at best (e.g for more information please check my blog post [Oracle] DB Optimizer Part II - Extending execution plans or how-to find the bad one and the whole series about it).

 

Note, that the estimated CBO costs do not necessarily reflect the real work which needs to be done.

 

>> The execution plan for the first query shows an estimated cost of only 2

Yes, but please look closely at the execution plan. The cost represents only one execution, but you have an INLIST ITERATOR in it, which executes the sub tree for every (INLIST) value. However we currently don't know which IN LIST it is, but i would assume that it is for VGUID with help of the SQL context and your description of the PK.

 

>> My 'guess' at the moment is that the 'estimate' is wrong

It is very often wrong in a SAP environment due to the specific SAP Oracle database settings (e.g.[Oracle] DB Optimizer Part VI - Effects of disabled bind variable peeking, adaptive cursor sharing and cardinality feedb…) and the limited feature usage (or sometimes bugs).

 

However before we start with wild guesses and crystal ball magic - please provide the detailed database structure information and the whole DBMS_XPLAN output (at best with runtime statistics).

 

Regards

Stefan

 

P.S.: It looks like the second SQL is truncated as well.


Viewing all articles
Browse latest Browse all 8940

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>