Re: PL/SQL vs Java in 10gR2 and up

  • From: Tim Hall <tim@xxxxxxxxxxxxxxx>
  • To: mdinh@xxxxxxxxx
  • Date: Fri, 17 Sep 2010 14:16:32 +0200

Hi.

As author of the article linked, I would just like to stress that these
tests should not be taken out of context. They were just to prove a point to
myself about a single issue, that being, can Java do basic mathmatical
operations quicker than PL/SQL, something I had heard said before.

The are several other things to consider:

- The tests do not compare the performance of processing data in tables,
which is the point of PL/SQL after all.
- They do not look at the effect on the memory allocations (JAVA_POOL_SIZE)
that using Java in the database has. Increasing the Java pool size may mean
decreasing something else.
- They do not test the Java in a multi-user environment.
- They do not take into account native code compilation for either PL/SQL or
Java (JIT).

Deciding to use Java in place of PL/SQL is an option, but please don't base
your decision on a test I wrote that added a couple of numbers together. :)

Cheers

Tim...

On Fri, Sep 17, 2010 at 2:35 AM, Michael Dinh <mdinh@xxxxxxxxx> wrote:

>  It depends.
>
>
>
> PL/SQL Vs. Oracle JVM: Speed Comparison for Mathematical Operations
>
>
>
>
> http://www.oracle-base.com/articles/misc/PlsqlVsOracleJvmSpeedComparisonForMathematicalOperations.php
>
>
>
> The tests now show the Oracle JVM is out-performing the PL/SQL for this
> basic looping and mathematical processing.
>
>
>
> These results are consistent for this test on database versions (9.2, 10.2,
> 11.1 and 11.2).
>
>
>
> Michael Dinh : XIFIN
>
>
>
> NOTICE OF CONFIDENTIALITY - This material is intended for the use of the
> individual or entity to which it is addressed, and may contain information
> that is privileged, confidential and exempt from disclosure under applicable
> laws.  BE FURTHER ADVISED THAT THIS EMAIL MAY CONTAIN PROTECTED HEALTH
> INFORMATION (PHI). BY ACCEPTING THIS MESSAGE, YOU ACKNOWLEDGE THE FOREGOING,
> AND AGREE AS FOLLOWS: YOU AGREE TO NOT DISCLOSE TO ANY THIRD PARTY ANY PHI
> CONTAINED HEREIN, EXCEPT AS EXPRESSLY PERMITTED AND ONLY TO THE EXTENT
> NECESSARY TO PERFORM YOUR OBLIGATIONS RELATING TO THE RECEIPT OF THIS
> MESSAGE.  If the reader of this email (and attachments) is not the intended
> recipient, you are hereby notified that any dissemination, distribution or
> copying of this communication is strictly prohibited. Please notify the
> sender of the error and delete the e-mail you received. Thank you.
>
> *From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:
> oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Brady, Mark
> *Sent:* Thursday, September 16, 2010 2:43 PM
> *To:* 'oracle-l@xxxxxxxxxxxxx'
> *Subject:* PL/SQL vs Java in 10gR2 and up
>
>
>
> *This has been a Tom Kyte maxim for a few quite some time. I’m wondering
> if it still holds true between PL/SQL and Java.*
>
>
>
> 1.  Do it in SQL.
>
> 2.  If SQL can’t do it, do it in PL/SQL.
>
> 3.  If PL/SQL can’t do it, do it in Java.
>
> 4.  If Java can’t do it ask yourself if it needs to be done.
>
>
>
> *As versions progress often there are enhancements which correct
> deficiencies of the past. Have such enhancements occurred to put Java on a
> more equal footing? Is PL/SQL still the best method for scripting/stored
> procedure writing?*
>
>
>
> *In addition to a yes or no, could you add any specific advantages in
> terms of performance (vague, I know) that either one has over the other?*
>
>
>
>
>
> *Mark Brady*
>
> *Constellation Energy Group*
>
>
>
>
>
>
>
> >>> This e-mail and any attachments are confidential, may contain legal,
> professional or other privileged information, and are intended solely for
> the addressee.  If you are not the intended recipient, do not use the
> information in this e-mail in any way, delete this e-mail and notify the
> sender. CEG-IP1
>

Other related posts: