Thursday, June 27, 2013

PLSQL in SQL - Oracle 12c New feature

I wanted to test what I saw in a presentation named "12 Things About The Latest Generation of Database Technology" by Thomas Kyte. I took the same queries from the demo and executed them against an Oracle 12cR1 Database (12.1.0.1.0) on Oracle Linux 6.3 x86_64.

Here is the new syntax with PLSQL "embedded" in a SQL query ... Here is the creation of a stage table ... (ctas+stats+function) ... Here is the explain plan and trace for the "old fashioned way" ... Here is the explain plan and trace for the new PLSQL in SQL ... Conclusions are about the same as what Thomas Kyte showed in his presentation, less CPU which results in faster Elapsed time.

Hit the Oracle 12c documentation for more info about PLSQL Function in SQL using the With statement:
http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_10002.htm#SQLRF55665

Note: Between each of these execution I flushed the shared_pool and buffer_cache.

No comments:

Post a Comment