Quest Forum Digital Event 2020
Every database developer knows that PL/SQL functions can be used in SQL queries. However, not many are aware of the measurable cost of SQL-to-PL/SQL context switches. Even fewer can definitively answer how many times their functions will be called (depending upon the complexity of queries or portion of the query where the function is located). This presentation sheds some light on this gray area. The answer is actually very simple: the number of calls is driven by the cardinality of involved tables plus the final execution plan of your query (after all query-transformation steps). Unfortunately, GUESSING what exactly the Cost-Based Optimizer will do to your query is very difficult. This presentation will show you how to KNOW rather than guess and how to use this knowledge to optimize the performance of your database.