Donnerstag, Januar 17, 2013

Details zur INTERNAL_FUNCTION

Tanel Poder liefert in seinem Blog einige Informationen zum Auftreten der INTERNAL_FUNCTION in den Prädikat-Informationen eines execution plans. Sie tritt einerseits bei impliziten Typkonvertierungen auf, kann aber auch an Stelle komplexerer OR-Verknüpfungen erscheinen und ist das Ergebnis einer UNPARSE-Operation, mit der DBMS_XPLAN die textuelle Repräsentation des Ausführungsplans aus dem internen Plan erstellt. Dabei gilt:
By the way, why do I keep saying “binary” execution plan and in double quotes? It’s because I want to emphasize that the real execution plan that Oracle executes is not in the text form like we see on the screen, the text is just generated for humans, for troubleshooting reasons. The execution plan is not a real executable binary (as in oracle.exe) either, it’s not directly fed to the CPUs for execution. The physical execution plan in the library cache child cursor is a bunch of opcodes, object_ids and pointers for defining the hierarchy and order of rowsource execution. It’s the SQL execution engine, which then loops through these opcodes, decodes them and knows what to do (which rowsource function to call) next.
Interessanterweise ist EXPLAIN PLAN bei der UNPARSE-Operation anscheinend manchmal geschickter und schafft es, OR-Prädikate aufzulösen, die DBMS_XPLAN in die INTERNAL_FUNCTION übersetzt.

Keine Kommentare:

Kommentar veröffentlichen