Performance: SQLJ & JDBC

I am currently working on a project testing the performance of JDBC and SQLJ on an Oracle9i DB. When performing inserts using SQLJ some unexpected behavior where seen. During all the test runs the initial insert where on average 100x larger than the average insert times from the rest of the run. I can not find any reasonable explanations as to why this is happening. Has anyone seen similar behavior working with SQLJ? Any ideas as to why the initial insert times are so large?
PS. The inserts using JDBC are not behaving like this. Some peaks on insert times, but they are spread out over the whole run.

Vladimir Borkovkin (guest) wrote:
: Hi,
: Oracle has performance extension for JDBC and it works fine.
: Now SQLJ programs runs much slowler than JDBC. Will SQLJ use
such
: a extentions?
: Regards,
: Vladimir
We will support similar performance extensions (only easier to
use :) in the forthcoming 8.1.6 version of SQLJ, as well as in a
forthcoming new release of client-side SQLJ.
Specifically, we will support batching through the new SQLJ
batching API (which is also going to be part of the SQLJ ISO
standard), as well as automatic statement caching.
Additionally, we are providing define extesnions that can offer
performance improvements in some cases.
Thanks for asking!
-- Ekkehard
null

Similar Messages

  • Speed: SQLJ, JDBC, Pro-C, Java

    Hi!
    Do you know of any benchmarking studies on comparing the performance of Java (SQLJ/JDBC) and C++ in Oracle? In the documentation, it said that we could do ahead compilation and make Java into C for optimized performance. I have a natural skeptical on marketing specification and wonder if you know of any third-party studies. I am thinking of building a computationally and data intensive application using Java because of its comparatively easier maintainability and flexibility.
    Any thoughts would be welcomed.
    Thanks.
    Aaron

    And what is your experience level with the two languages?
    If you are experienced, not just familar, with both, then you will be able to squeeze more performance out of C++ than java. But it is unlikely to be significant (ie it might be 10% faster.) On the other hand if you are very experience with one language and not experienced at all with the other then it is very possible that the two applications, as written by you, will have very different performance statistics.
    And of course, given that you are using Pro-C which means Oracle, your experience with PL/SQL and the trade offs between using that and offloading could produce orders of magnitude performance differences regardless of which language you use.

  • Slow performance of JDBC - ODBC MS ACCESS

    I experience a very slow performance for jdbc-odbc using ms access as the database. This program works fine with other computer (in term of performance). However, the harddrive is cranking big time with this computer (this is the fastest one among the computers I tested, and also has many gigabytes left to be used). The database is very small. Other computer use exactly the same java version and msaccess driver version. If anyone found the same problem, or have any suggestion please help. Thank you.

    I am having the same problem with one machine as well. Running MS Access 2000 (unfortunately), and all machines run well with one exception. DB reads take about 10 seconds each. If a solution has been found, please report.
    --Dave                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SQLJ/JDBC code compiles but doesn't run

    I keep getting a fatal error in the JAVA.EXE module when I try to run an code with SQLJ/JDBC. I've got my class and classpath set up like a oracle support tech told me to do but the code still bombs.
    I noticed java.exe bombs at the same address no matter what SQLJ/JDBC code I compile.
    Could it be conflicting with something on
    a NT 4.0 box.
    Anyone with ideas please respond.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MSCHWERY ():
    I keep getting a fatal error in the JAVA.EXE module when I try to run an code with SQLJ/JDBC. I've got my class and classpath set up like a oracle support tech told me to do but the code still bombs.
    I noticed java.exe bombs at the same address no matter what SQLJ/JDBC code I compile.
    Could it be conflicting with something on
    a NT 4.0 box.
    Anyone with ideas please respond.<HR></BLOCKQUOTE>
    Can you run a non Oracle Java application. Which version of JDK are you using.. do you have multiple versions of JDK .. if so make sure there is no conflict.. You may try re-installing the JDK if your non Oracle Java application also errors out..

  • SetCustomDatum performance SQLJ team please respond

    I am facing performance overhead when using Jpub generated
    classes for the object types.
    I am using 817 jdbc and jpub but my database is 816. I have seen
    that following statements each take around 2-3 seconds to
    execute. Is there any communication between driver and database
    to resolve the object type ?
    I have found some posting regarding this but no solution. has
    anyone here faced this problem ?
    Please help.
    cCallableStatement =
    (OracleCallableStatement)m_cConnection.prepareCall("{call
    list_unsync_appts_array(?,?,?,?,?,?,?,?)}");
    ((OracleCallableStatement)cCallableStatement).setCustomDatum
    (1,ct_number_arr);
    cCallableStatement.registerOutParameter
    (2,OracleTypes.ARRAY,"T_EVENT_SUMMARY_ARR");
    cCallableStatement.registerOutParameter
    (3,OracleTypes.ARRAY,"T_EVENT_DETAIL_ARR");
    cCallableStatement.registerOutParameter
    (4,OracleTypes.ARRAY,"T_EVENT_SUMMARY_ARR");
    cCallableStatement.registerOutParameter
    (5,OracleTypes.ARRAY,"T_EVENT_DETAIL_ARR");
    cCallableStatement.registerOutParameter
    (6,OracleTypes.ARRAY,"T_EVENT_SUMMARY_ARR");
    cCallableStatement.registerOutParameter
    (7,OracleTypes.ARRAY,"T_ATTENDEE_EMAIL_ARR");
    cCallableStatement.registerOutParameter
    (8,OracleTypes.ARRAY,"T_ATTENDEE_EMAIL_ARR");
    cCallableStatement.execute();

    I retried this using the command line, as well as JDeveloper 3.1.1.2. It does not work.
    Here are the specs:
    Windows 2000
    JDK 1.2.2
    Oracle 8.1.6
    JDBC & SQLJ 8.1.6 (comes with Oracle 8.1.6)
    The package looks like this:
    CREATE OR REPLACE PACKAGE qry IS
    TYPE qry_results IS REF CURSOR;
    FUNCTION get_all_appliances RETURN qry_results;
    END qry;
    Body looks like this:
    CREATE OR REPLACE PACKAGE BODY qry IS
    FUNCTION get_all_appliances RETURN qry_results IS
    results qry_results;
    BEGIN
    OPEN results FOR
    SELECT app_id, usr_app_name
    FROM appliances
    ORDER BY usr_app_name;
    RETURN results;
    END get_all_appliances;
    END qry;
    JPublisher does its thing, but it DOES NOT produce any output. It doesn't give any errors or anything, but it doesn't give any output files either.
    I figure it must not be able to construct a SQL/J iterator? I don't know what's going on.
    Please let me know if this is supposed to work or not? Is there anything in my code that should be changed to get it to work? Do I need to strongly type the REF CURSOR? The Jpub docs say it doesn't support strongly typed REF CURSORs.
    Please advise, thanks in advance! Also please define whether this is unsupported or a bug.
    David
    null

  • SQLJ JDBC

    Hi,
    Could you point me to some good resources (white papers) where I can read about performance issues when choosing between SQLJ and JDBC?
    I assume this is a rather general question, but I have to come up with a precise answer. This system is limited by a large number of inserts into Oracle, but the SQL statements are not complicated.
    Regards
    Flemming

    Marcel,
    Another approach could be:
    1) modify the CAPI generator to generate the following code into each CAPI package:
    -- these global package variables are defaulted to U(nknown); the first time an Insert operation is performed, it is determined whether the user is allowed to perform inserts and the g_ins_allowed is set accordingly to Y or N. The same applies to Update and Delete operations
    g_ins_allowed varchar2(1):= 'U';
    g_upd_allowed varchar2(1):= 'U';
    g_del_allowed varchar2(1):= 'U';
    function dml_allowed
    ( p_dml_type in varchar2 -- INS,UPD or DEL
    ) return boolean
    is
    begin
    if p_dml_type = 'INS'
    then
    if g_ins_allowed = 'U'
    then
    g_ins_allowed:= QMS_TRANSACTION_MGT.dml_allowed( <TABLENAME>, p_dml_type);
    end if; -- g_ins_allowed = 'U'
    return g_ins_allowed = 'Y';
    end if; -- p_dml_type = 'INS'
    ... and simmilar code for UPD and DEL
    end dml_allowed;
    2) Add a Business Rule BR_<TABLE ALIAS>000:
    the validation code:
    l_rule_ok:= dml_allowed( g_operation);
    triggering events: insert, update and delete
    Note: this business rule could be automatically generated into every CAPI if and when the generator code is modified. A more ingrained implementation would be possible with a change to the CAPI generator that would automatically call dml_allowed from the init procedure and process the result then and there.
    3) Change procedure disable_br to only allow this procedure to be executed for the owner of the underlying table and/or users with the GRANT privilege on the table (or any other requirement you fancy).
    4) Modify QMS_TRANSACTION_MGT to include the function dml_allowed; this function would check whether the current user has the required DML privilege on the indicated table p_tablt_name, either directly or through a role.
    Note alternatively, for example in case of more complex authorization rules, you could extend the dml_allowed function at CAPI level instead of using a generic QMS_TRANSACTION_MGT function
    best regards,
    Lucas

  • Performance of jdbc mapping lookup vs BPM Process

    Hello fellow consultants,
    I have project on AEX upcoming and now I`m deciding the strategy.
    I have to implement few processes for which I will use BPM. But inside these processes I have few jdbc calls for logging to the oracle db.
    Regarding the performance - what is better approach?
    make these jdbc calls as a jdbc lookup in mapping
    perform it as a regular part of bpm process
    Thank you for suggestions
    VB

    Hi VB,
    I have a different opinion than Fouad although I can understand his point, but for me, lookUps are rarely good and well implemented and it should be used in a very specific, required and critical scenarios. This is because this lookUp connection is not manageable, out of monitoring stuff and I don't think in the mapping step is the correct moment to open a JDBC connection with partner all of sudden.
    My Idea is more for the point number 2, where you have everything well explicit step by step, opening the connection being manageable, with monitoring even though it may bring one or two steps more to your BPM but I'm more concerned at this moment to follow the best practice of integration and thinking in Performance I don't think there will be a gain that would justify the JDBC Lookup.
    Regards,
    Diego 

  • Performance - using JDBC call with 'order by' vs sorting data on app server

    Hello! I need some valid thoughts on the performance of using a JDBC call versus processing information on the application server.
    Here is the somewhat simplified scenario:
    I need to retrieve customer information (name, e-mail, telephone), display it in HTML format and then be able to redisplay it in a different order. For example, initially the list would be displayed sorted by last name, but then a user might choose to sort it by e-mail address. Initial call to DB uses 'order by' in the SQL stmt to get me the initial ordering by last name. Results are stored in 2D array. However, when a user selects a different sort I have two options:
    1) just make another call to the DB with a different order by clause. This means I need to create a DB connection, connect to DB, retrieve the results and read them from result set into a 2 dimensional array
    2) re-sort data in the 2D array populated during the initial call. This means I need to use java.util.Arrays.sort(my_2D_resultsArray, my_custom_comparator)
    Question is : which is more efficient? Number of entries retrieved can be anywhere from 0 to a few thousands (depending on other filters such as customer's country). My feeling is that option umber 2 is better, but I would like to get your opinion.
    Thank you!

    Good points! Thanks! I ran a test (see code below) and it takes less than a second to sort 2000 Strings and 2000 nulls. The only thing I ran the test at a UNIX prompt as oppose to from within app server (Weblogic). I expect the speed to be compatible though. Do you think that test was valid and tells us that sorting on the app server is probably faster than doing another SQL query?
    import java.io.*;
    import java.math.*;
    import java.util.*;
    import java.util.Arrays.*;
    public class Test {
      public static void main(String[] args) throws Exception {
        Test test = new Test();
        test.testSortingPerformance();
      public void testSortingPerformance() {
        Object[] objArray2 = new Object[]{};
        Vector v = new Vector();
        Date start, end;
        java.util.Random rd = new java.util.Random(2000);
        for (int i = 0; i < 2000; i++){
          v.add(new Object[]{new String("" + rd.nextInt())});
          v.add(new Object[]{null});
        objArray2 = v.toArray();
        Object[] innerObjArray2 = new Object[]{};
        MyComparator2 myComp = new MyComparator2();
        start = new Date();
        java.util.Arrays.sort(objArray2, myComp);
        end = new Date();
        for (int i = 0; i < objArray2.length; i++) {
          System.out.println();
          innerObjArray2 = (Object[])objArray2;
    for (int j = 0; j < innerObjArray2.length; j++) {
    System.out.print(innerObjArray2[j] + " ");
    System.out.println(v.size());
    System.out.println("Start " + start + " End " + end);
    import java.util.*;
    public class MyComparator2
    implements Comparator {
    //position in the inner array to use for comparison
    private int position = 0;
    //default empty constructor
    public MyComparator2() {
    //implement compare method
    public int compare(Object o1, Object o2) {
    Object[] strAr1 = (Object[]) o1;
    Object[] strAr2 = (Object[]) o2;
    if (strAr1[0] == null){
    if (strAr2[0] == null){
    return 0;
    else{
    return -1;
    else if (strAr2[0] == null){
    return 1;
    return ( (String) strAr1[0]).compareTo( (String) strAr2[0]);

  • Performance in JDBC-Adapter

    Hallo,
    it is possible to become the time for processing in the JDBC-Adapter. I´m interesing for the time splitted in XI-handling and real data-base time to deliver the data.
    In the RWB
    --> Performance-Monitoring
    --> data source: PMI
    --> component: XIAdapterService/JDBC.af.xxx/I
    --> the processing time is always 0.
    Thanks in advance,
    Frank

    Take a look at this thread: Performance  Monitoring & Tracing in XI
    I think you have to enable PMI monitoring in SXMB_ADM.
    Alex

  • JVM Fails when using SQLJ/JDBC

    My program is often terminating with the following error.
    # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outside the VM.
    # Program counter=0x604483d3
    From the error I suspect it is either the SQLJ runtime or the JDBC driver causing the problem.
    I mostly get this error after 3 - 4 hrs of execution of my program.
    Has anybody experienced this problem? Any input is appreciated.
    Vig
    null

    Hi there
    it seems to be an outside-JVM exception, it could be caused by native code,
    Try to use a thin driver of Java which is 100% java, and tell us what does it do!
    salam

  • Improving performance in JDBC

    hi..
    i am making a jdbc type 3 connection with MS SQL Server, for making a connection between Java and SQL Server takes 800 Milli Seconds. This reduces our performance for a simple query. We are using JBoss as the Middle Tier , Is there any other database api for making connection between java and sql server very optimized way. need a urgent reply.
    rgds,
    balaji.

    i am making a jdbc type 3 connection with MS SQL
    QL Server, for making a connection between Java and
    SQL Server takes 800 Milli Seconds. This reduces our
    performance for a simple query. We are using JBoss as
    the Middle Tier , Is there any other database api for
    making connection between java and sql server very
    optimized way. need a urgent reply.I would suspect that it has nothing to do with java itself nor the drivers.
    For starters jboss normally uses a connection pool - which means that the connection already exists.

  • Execute SQLJ/JDBC within InfoBus Data Form???

    Is there a way to execute SQLJ or JDBC from within the InfoBus data forms without opening a new connection?
    Is there a way to execute SQLJ or JDBC via the Business Components using the connection already established in the InfoBus frame?
    Please post any samples if this can be done.
    Thanks
    Andrew

    Andrew,
    The best way to do what you are asking is to create a custom method at the application module or view object level, export that to your client, then call the method from the form.
    Here is an example from a JSP Web Application. The basic idea is the same though.
    1. Double-click the appmoduleImpl.java file for your application module to open it in the code editor (expand the Application Module node to find this source file, if there is not one there, edit your app module, click on the Java tab, and check the Generate Java Files checkbox, click Finish and rebuild your project).
    2. Enter the code that you want to execute (I've included an example below that calls a stored PL/SQL procedure to calculate a value).
    3. Compile the file to make sure your code is OK.
    4. Edit the Application Module and click on the Client Methods tab. You should see your new method in the Available list.
    5. Shuttle the method to the Selected list.
    6. Click Finish and rebuild your project.
    7. From your Infobus client code, call the method you just wrote. You may need to include the package that contains the business components code.
    Note that when you export client methods from your BC4J project, you may need to include the stubs for these methods in your client project, depending on how you deploy your BC4J project. For example, if you deploy your BC4J app module as an EJB, the deployment process will generate the client stubs for these exported methods into a separate project (or you can specify to have them generated into your client project on the Remotable tab of the app module wizard). See the online docs for deployment for more information.
    Example exported client method:
    public int getTotalHits(String mon, String year) {
    CallableStatement stmt = null;
    int total;
    String totalhits = "{? = call walkthru.total_hits(?,?)}";
    stmt = getDBTransaction().createCallableStatement(totalhits, 1);
    try
    // Bind the Statement Parameters and Execute this Statement
    stmt.registerOutParameter(1,Types.INTEGER);
    stmt.setString(2,mon);
    stmt.setString(3,year);
    stmt.execute();
    total = stmt.getInt(1);
    catch (Exception ex)
    throw new oracle.jbo.JboException(ex);
    finally
    try
    stmt.close();
    catch (Exception nex)
    return total;
    null

  • Increase Performance on jdbc adapter.

    Hi guys,
    I have a jdbc scenario that is accessing two data bases (Oracle and DB2). I would like increase query performance! So, I would like to know if there are any configurations parameters that I need to adjust to get more performance.
    Is it possible put the jdbc adapter doing several queries on the same table at same time? If the jdbc have this possibility it is great, because in one instruction it could do several selects/updates and improve more performance…
    Any suggestions or documentation are appreciated.
    Thanks in advance,
    Ricardo.

    Hi,
    With Receiver JDBC adapter it is possible.
    create as many STATEMENT tags as needed with the required action , tablename, strcuture etc.
    With sender JDBC adapter, you can mention only one Select Query and multiple queries will not be possible.
    <i> have a jdbc scenario that is accessing two data bases (Oracle and DB2)</i>
    Also, for this, you need to use separate JDBC adapters as each adapter will be specific to a database and the DB installation. You cannot use a single JDBC adapter to access multiple databases.
    Regards,
    Bhavesh

  • Win 2000 and sqlj/jdbc

    I have installed oracle 9i (verison 1) on a win 2k system. When trying out the brief test demos in the sqlj folder I get the error "exception in thread "main" java.lang.noclassfounderror: TestInstallJDBC.
    TesInstallJDBC is the test demo which comes in the ora90/sqlj/demo folder.
    Yes I have java 1.2.2 installed, yes all the classpath and path values are set properly. Also the dir in which the script resides is in the classpath. Yes when I type in "sqlj" at the command prompt I get the proper output.
    The JDBC driver is 9.0.1.1.0 and the sqlj version is 9.0.1.0.0.
    I read in the oracle literature that sqlj had only been tested on win NT. IS THIS A WIN 2K Problem???????
    HELP!

    Quote
    then copy all bios files to the ramdrive from either a floppy or a cd.
    maybe i was not clear enough.
    copy the bios file and flash utility to a cd or floppy before you use w98 boot disk.
    i flashed my bios yesterday with the method i described and it worked perfectly.
    need more and better memory...seems i keep forgetting all the little things

  • Performance of JDBC type 2 vs. type 4

    We are currently using Oracle's thin (type
    4) JDBC driver on Solaris. Should we switch to the type 2 driver for performance
    reasons? Does anyone have practical
    experience with this?
    Thanks
    -Bernhard

    It has been my experience that the type 4 is better than the type 2 because the driver synchronizes around the native calls. If you have multithreaded application, the type 4 is much more concurrent.
    This was as of 8.0.4... versions and may have changed.

Maybe you are looking for

  • Printing Problem with AR9

    We've got several machines which use an intranet application. The app is web based and produces some PDFs on the fly which appear in popup IE windows, which in turn displays them in Adobe Reader. On 2 PCs (both running vista ie8 and ar9.2) the print

  • Need to extract data from R/3 to BI...

    Hi Friends, We need to extract some data available in the R/3 side to BI. I have written code in a function module which brings the output into the table e_t_data. now by attaching this function module, we created a Data source also. and then from BI

  • Adobe Audition App Crash on Startup (windows) ImageRenderer.dll Fault Module

    I just installed Audition and when I try to open it I receive an error message that it has stopped working and my options are to close the program or check online for a solution. I checked online and nothing came up. I checked my account and everythi

  • How to config  MIGO (or MB01) Goods Receipt by PO can input material numer?

    Dear All, I have a case for when MIGO(or MB01) Goods Receipt  by Purchase Order, user can input the Purchase order  and also can  allow to input the Material number.Because when PO item has many lines,user want to input the Material number to select

  • Best Physical Location for AEBS

    By the end of the summer I plan on upgrading my old Airport base station to the current model. What is the consensus on the best physical location for the station? We have a two-story brick home with a basement and I plan on using the AEBS for wirele