⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fullname.tst

📁 OReilly Oracle PL SQL Programming第4版源代码
💻 TST
字号:
CREATE OR REPLACE PROCEDURE test_fullname (
   counter IN INTEGER
 , empno_in IN emp.empno%TYPE := 7788
)
IS
   l_name fullname_pkg.fullname_t;
BEGIN
   PLVtmr.set_factor (counter);
   PLVtmr.capture;

   FOR i IN 1 .. counter
   LOOP
      l_name := fullname_pkg.fullname (empno_in);
   END LOOP;

   PLVtmr.show_elapsed ('function in SQL');
   PLVtmr.set_factor (counter);
   PLVtmr.capture;

   FOR i IN 1 .. counter
   LOOP
      l_name := fullname_pkg.fullname_explicit (empno_in);
   END LOOP;

   PLVtmr.show_elapsed ('explicit function in SQL');
   PLVtmr.set_factor (counter);
   PLVtmr.capture;

   FOR i IN 1 .. counter
   LOOP
      l_name := fullname_pkg.fullname_twosteps (empno_in);
   END LOOP;

   PLVtmr.show_elapsed ('function in PLSQL');
/*
SQL> exec test_fullname(10000)
function in SQL Elapsed: 1.38 seconds. Factored: .00014 seconds.
explicit function in SQL Elapsed: 1.43 seconds. Factored: .00014 seconds.
function in PLSQL Elapsed: .72 seconds. Factored: .00007 seconds.

SQL> exec test_fullname(100000)
function in SQL Elapsed: 13.01 seconds. Factored: .00013 seconds.
explicit function in SQL Elapsed: 14.38 seconds. Factored: .00014 seconds.
function in PLSQL Elapsed: 7.28 seconds. Factored: .00007 seconds.
*/
END;
/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -