Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Java in Stored Procs

Re: Java in Stored Procs

From: Don Seiler <don_at_seiler.us>
Date: Fri, 6 Jul 2007 10:51:23 -0500
Message-ID: <716f7a630707060851q265b6abelc935461dd7222346@mail.gmail.com>


Yes his test wasn't very scientific or controlled. Basically it is bulk processing of 1-2 million records. I'm not sure why yet, but I'll leave that for later, and just focus on "how" for now.

The native compilation is using ncomp. Per the URL I posted in my earlier email:

"The accelerator, implemented within the ncomp tool, natively compiles all classes within the specified JAR or ZIP file or the list of classes. It natively compiles these classes and places them into shared libraries according to their package. Note that these classes must first be loaded into the database."

Now when he runs ncomp it complains that we don't have the oci8 drivers installed. Even when he uses the -thin parameter. It seems to fail to pass the -thin to the dropjava stage. I'll check metalink for known bugs.

Don.

On 7/3/07, Job Miller <jobmiller_at_yahoo.com> wrote:
> it's not clear from the email, what he is actually trying to put into the
> database.
>
> just something that when called from the front-end goes faster.
>
> native compilation of PL/SQL? I thought he was talking about Java?
>
> bulk inserting data? pl/sql bulk processing or batch jdbc interface from
> the front end performs the same.
>
> what is this processing doing? the only time java should be in a db stored
> proc is when PL/SQL can't do it, and there are some things that fit that
> requirement.
>
> Job
>
> Alex Gorbachev <ag_at_oracloid.com> wrote:
> Forgive me slightly humorous tone but...
> You need to avoid putting this crap in the database. So use any means
> for that - tell your developer that it's slow by design, that it's
> compiled on the fly into a bunch of SELECTs and PL/SQL code, tell him
> that it cases all kind of ORA-600 (you wouldn't be far from truth).
> You target should be to convience him to convert it to PL/SQL and make
> sure he doesn't become a PL/SQL developer in one week - nothing worse
> than Java developer writing code in PL/SQL! ;-)
>
>
> On 7/3/07, Don Seiler wrote:
> > Today one of my developers asked about having java code in our DB
> > (10.2.0.2). He had already been playing around with it some, and
> > found it much slower. Not really a scientific test, but he found that
> > calling java routines from the PowerBuilder front-end could handle 1
> > million records in 52s, where as calling the same routine from within
> > his stored proc was much slower (10k records in 24s). He's now
> > looking at native compilation [1] as a way to speed things up.
> >
> > We are "a java shop" and the main goal here is re-use of existing data
> > processing code, so that we don't have to update the same logic in
> > multiple places.
> >
> > I thought I remembered reading a paper or presentation that mentioned
> > some solid reasons for keeping java out of the database. Feuerstein
> > or Kyte perhaps.
> >
> > I'd like to know what you fine folks have to say about the matter.
> > Should never the twain meet? Anyone with ncomp experience?
> >
> > [1]
> >
> http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/chten.htm#sthref505
> >
> > --
> > Don Seiler
> > oracle blog: http://ora.seiler.us
> > ultimate: http://www.mufc.us
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
> >
> >
>
>
> --
> Alex Gorbachev, Oracle DBA Brewer, The Pythian Group
> http://www.pythian.com/blogs/author/alex
> http://blog.oracloid.com
> BAAG party - www.BattleAgainsAnyGuess.com
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
>
>
> ________________________________
> Be a better Heartthrob. Get better relationship answers from someone who
> knows.
> Yahoo! Answers - Check it out.
>
>

-- 
Don Seiler
oracle: http://ora.seiler.us
ultimate: http://www.mufc.us
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jul 06 2007 - 10:51:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US