Create or replace and resolve java source named "J1"...
Create or replace function f1
(
P1 in varchar2,
P2 in varchar2
) Return varchar2
As language java
Name 'j1. M1 (java. lang. String, java. lang. String) return java. lang. string ';
Function call. Each time a new database connection is established, it runs slowly for the first time and then runs quickly. The reason is:
When a session runs Java for the first time, it takes some time for Oracle to load the vjvm (a virtual Java VM) associated with the session. After the vjvm is loaded, the java runtime in the same session does not need to load the vjvm again, so the running speed is faster. Whether or not vjvm can be loaded in advance, so that the first running will not be faster. Unfortunately, Oracle does not support it yet.
The process for Oracle to load vjvm Based on sessions is transparent, and no displayed commands are provided to start session vjvm. Therefore, you cannot configure a per-session VM. Although 10 Gb provides an ojvmjava application, it does not solve the problem mentioned above. In addition, in some foreign forums, java execution in Oracle is 10 times slower than external execution. In short, although Oracle is embedded with java, it is best to write java outside the database in the application, and let Oracle only do the database, so the execution efficiency will be better.
Refer:
Http://asktom.oracle.com/pls/asktom/f? P = 100: 11: 0: P11_QUESTION_ID: 361617955080
Http://forums.oracle.com/forums/thread.jspa? ThreadID = 372527