Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    Arrow Unanswered: When to use Java Stored Procedures

    Hi
    I have few questions regarding the usage issues with Java Stored Procedures.
    I wanted to know what factors need to be taken into account when implementing stored procedures.

    I know java on oracle side, gives lots of scope of network bandwidth efficiency as you could do most of the computation on server side only.

    But on the second hand it adds to the CPU utilization of the server where oracle is running.

    Would someone recommend using Java Stored Procedures, for a user intensive site, where lots of connections are made, as at given time, it has around 300-400 users.

    There is another scenario, where there are reports being run, which is like 5-7 per day, but are very intensive.

    Can someone share his/her experience on this.
    TaR (Thanx and Regards)
    Aruneesh

  2. #2
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    Arrow Anyone ???

    Any one, wants to share his/her experience in this domain.
    TaR
    Aruneesh

  3. #3
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    I don't think I or anyone here could answer this any better than Oracle already has.

    Oracle supply you with PL/SQL which in the right hands is an awesome DB processing language.

    Sun supply you with Java, which is an awesome cross platform UI.

    One is made by Oracle for querying/processing on Oracle databases by Oracle code. One is made by Sun, but for which Oracle has implemented support.

    Oracle's own documentation discusses the overhead of running Java on their servers.

    'nuff said?

    Cheers
    Bill

  4. #4
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    Arrow Practical Deployments

    Bill
    I am looking for people who would have had experience.
    I know what you are saying is theoratically correct, and to a certain extent practically be.

    But I project a scenario here, and want to get some numbers, in this case. It sure means overhead of having java classes running in oracle, but how much load would it much, and how to measure the statistics of the same.

    I have a code with lots of queries returning values.
    Like
    query1 returns X
    query2 returns Y, but it depends on X
    query3 returns Z, but it depends on Y


    Since running all the same in the code, would involve response from oracle to the application server, you have network data, so there would time gap in those two, since I could just have a java class perform the queries automically.

    Hope u get my question now.
    TaR
    Aruneesh

  5. #5
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    You should consider that the overhead of the JVM on Oracle is quite large, it is well documented already by Oracle. As I understand it, the JVM maintains state per session, this means that past the second user, the overhead is directly related to number of users - even before they issue their first query.

    I think the answer you need is tucked away in some reading, not on here. Maybe I'm wrong (I'm getting used to it:-)) but I doubt anyone here can give you answers relating to performance on your servers on your project.

    If you want my tuppence, run PL/SQL on the server, run Java on the client. Running Java on the server is like trying to run VMS on a VMS box running a PC emulator running a VMS emulator running a PC emulator. Technically great but a waste of time.

    Cheers
    Bill

  6. #6
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    Arrow Oracle Documentation

    Bill
    Could u send me a link to documentation on the same, so that I get an insight of what would happen if I start using JVM stuff.
    TaR
    Aruneesh

  7. #7
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Sure...

    http://www.google.com/search?hl=en&i...e+JVM+overhead

    or

    http://www.google.com/search?hl=en&i...+java+overhead

    but don't confuse the Java guys concept of overhead with the database guys concept.

    Hth
    Bill

  8. #8
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Originally posted by billm
    Running Java on the server is like trying to run VMS on a VMS box running a PC emulator running a VMS emulator running a PC emulator. Technically great but a waste of time.
    I like that!

  9. #9
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    I would say the best way to decide is to benchmark it yourself as every system/app is different.

    What Oracle recommend is that you stick with PLSQL for most database ops but there are some tasks which are very difficult and or inefficient in PLSQL but are very easy and fast in java. So if you are doing lots of compute intensive stuff rather than database DML then java might be better. BUT it also depends on how much CPU / network resources you have. If you have a high CPU load already then using the JVM might kill your performance anyway, also it might be better to run the java code on a different server but that also depends on your network bandwidth/latency between the two servers. So just having different hardware may be affect your choice of PLSQL or Java.

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •