Oracle embedded java

Source: Internet
Author: User
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
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.