How to reduce the number of exchange between the database & the app?

Hi,
In order to resolve performance issue of my application under a dirty network (ping=150ms), I make use of Ethereal.
And I noticed that an incredible amount of TCP exchanges (little SQL requests amoung others things) was complete between my application and the database.
Does exist a KODO or JDO parameter upon which I could work around in order to optimize these exchanges/SQL requests?
DB: Oracle 9.2.0.1 --
KODO: 3.3.3 --
Thanks a lot.
Mathieu, STERIA France
Message was edited by:
steria_fr
Message was edited by:
steria_fr

You can activate logging of every SQL being issued by Kodo by setting kodo.Log:SQL=TRACE.
Kodo issues SQL when the application accesses object fields/relations that are not yet loaded. Analysis of SQL would indicate what is being fetched. You can minimize the number of SQL, say, adding a set of fields in the same fetch-group thereby bringing them from database in a single SQ!L call.

Similar Messages

  • I wanted to know how do you calculate the number of days between two dates

    i wanted to know how do you calculate the number of days between two dates in java ? i get both the dates from the database. i guess there are many issues like leap year and Febuary having diff no of months ..etc.

    thanks..
    I solve my problem as
    public class MyExample {
        public static void main(String a[]) {
            String stdate = "2009-03-01";
            java.sql.Date currentDate = new java.sql.Date(System.currentTimeMillis());
            java.sql.Date preDate = java.sql.Date.valueOf(stdate);
            System.out.println(currentDate);
            System.out.println(preDate);
    //        int dateCom = preDate.compareTo(currentDate);
    //        System.out.println(dateCom);
            long diff = currentDate.getTime() - preDate.getTime();
            int days = (int) Math.floor(diff / (24 * 60 * 60 * 1000));
             System.out.println(days);
    }

  • How to get the number of days between 2 given dates

    Hi all,
    How can I find the number of days between any 2 given dates.
    Thanks

    Hi
    Here's a dirty way:
    If you've got two Date objects in Java, call getTime() on each one (which gives you a value in milliseconds), then subtract the two millisecond values, and divide the result by the number of milliseconds in a day (24 * 60 * 60 * 1000). There's more `elegant' ways to do this, but this method only requires one line of Java.
    Best wishes
    Kevin

  • Exception:"Decrease the number of char between the beginning of the document and its root element"

    I'm now using a javabean in my jsp page to parse xml;when my xml file's size is
    about 10k,it just work fine;when my xml file's size became 50k,it throws the followng
    Exception:
    Failed to open xml document,Failed to retrieve Public id or system id from the
    document. Decrease the number of char between the beginning of the document and
    its root element. But when I run this javabean in JBuild ,it works fine no matter
    how big the xml file becomes;
    Why? the error message is in the attachment.

    The prologue must be included at the top of the document, followed by the root
              element.
              joden2000 wrote:
              > what does this exception mean:decrease the number of char between the beginning
              > of the document and its root element? When my xml file is about 10k,it works
              > just fine,when it becomes 50k ,the exception show.How can I deal with this?
              

  • Count the number of records between two key values (BTREE)

    How can I count the number of keys between two values?
    I'm using python driver, and BTREE access method.
    ====>
    ideally what I want is to average a whole time-series data set (the intervals can change) to a given number of points. The keys are the time stamps and the values are the data that needs to be averaged. I need to count the number of records between two time stamps so that I can divide that number by the number of points i need, and average the data. What is the best way to do this?  Or should I just keep the intervals for the time stamp constant and use RECNO access method?
    Thank you
    (first post btw.. and why aren't there many people in stackoverflow who answer Berkeley DB questions?)

    BDB is an embedded db and it does not have any internal counters or statistics that you could grap to use for this.    You will need to do it manually.
    You can create a cursor, grap the records you want, each time you get the next record you bump a counter.
    If you are using RECNO, you can use a cursor to get the record number of the record (DB_GET_RECNO), and if all you data is in
    sequentail records with no missing records you can figure out the total count by take last rec # - initial rec # + 1 to get a total count.
    If you switch over to the SQL API, you can issue a SQL query to give you a count.  Select count(*) Where .......
    Since you have to grab the data anyway, then best may be to count records as you go along.
    thanks
    mike

  • How do i get number of days between 2 dates?

    How do i get number of days between 2 dates?
    and the result must be in int.
    for example
    Ex. startdate: 2006-06-01 enddate: 2006-06-30 and the result is: 30
    how to do so? thx

    mel
    Iv'e used this method. It assumes startdate,enddate and days have been defined before but you could pass them as args.
    void days()
        try
          Date d1 = DateFormat.getDateInstance().parse(startdate);
          Date d2 = DateFormat.getDateInstance().parse(enddate);
          long days = (d2.getTime()-d1.getTime())/1000/60/60/24;
          days = ""+days;
        catch (ParseException e)
          System.out.println("Invalid date format");
      }It actually gets the duration in ms and divides down to days.
    Regards
    Chris

  • How  can I get number of days between 2 dates ?

    How can I get number of days between 2 dates ?
    Give me answer as soon as possible.....

    Mukesh_Prajapat wrote:
    How can I get number of days between 2 dates ?
    Give me answer as soon as possible.....Is google broken again?
    [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]

  • How can i get number of days between two dates represented by two dates?

    how can i get number of days between two dates represented by two date objects. One is java.sql.Date, the other is java.util.Date?

    tej_222 wrote:
    But how do I do that conversion. from java.sql.date and java.util.date to calender?
    -thanks for the quick response.You may find the following utility code samples useful:
    [http://balusc.blogspot.com/2007/09/calendarutil.html]
    [http://balusc.blogspot.com/2007/09/dateutil.html]
    ganeshmb wrote:
    (date1.getTime() - date2.getTime())/(1000*60*60*24) should do.
    getTime returns millsecond value of date object and the difference divided by no of milliseconds in a day should fetch you the difference in terms of days.This doesn't respect the DST. Use java.util.Calendar.

  • How to find the number of users  connected to database from OS level(Linux)

    Hi All,
    Could anyone know , how to find the number of users connected to database without connecting with sql*plus
    is there any command to find it?
    example we have 10 databases in one server, how to find the number of users connected to particular database without connecting to database(v$session)?
    oracle version:- 10g,11g
    Operating System:- OEL4/OEL5/AIX/Solaris
    any help will be appreciated.
    Thanks in advance.
    Thank you.
    Regards,
    Rajesh.

    Excellent.
    Tested, works as long as you set the ORACLE_SID first ( to change databases )
    ps -ef | grep $ORACLE_SID | grep "LOCAL=NO" | awk '{print $2}' | wc -l
    Thanks!
    select OSUSER
        from V$SESSION
    where AUDSID = SYS_CONTEXT('userenv','sessionid')
        and rownum=1;Best Regards
    mseberg

  • How generate a random number that is between 0 and 15! (0-15)

    how generate a random number that is between 0 and 15 ??? (0-15)
    pls tell me, thx!!!!!!!!!!!!!!!!!

    import java.util.Random;
    Random r = new Random();
    int mynumber = r.nextInt()%16;
    For (2^1)-1 number use:
    -> int mynumber = r.nextInt()&15; // speedup

  • How system is determining the Number of Foreign trade data in the Header do

    Dear consultants
    how system is determining the Number of Foreign trade data in the Header -delivery documents(LF) in the Organization Tab.
    Regards
    prakash

    Number of foreign trade data in MM and SD documents.
    Path : SPRO-MM-Purchasing-Foreign Trade/Customs-Define Number Ranges-General Import/Export Processing.(internal number range)
    I hope MM guys will maintain in the above path

  • How can I stop the number of unread emails showing on the icon for my main account including the number of emails in my gmail account as well?

    How can I stop the number of unread emails, displayed on the icon for my main account, including the number of unread emails in my gmail account as well? The number is accurate (unlike the many users who seem to have phantom unread emails) it's just that I want each acc to show its own total, as it did before.  I suspect I fiddled with some setting unwittingly.  It seems to do it first thing each morning, particularly.  Many thanks

    If you go to Settings>Notification Centre>Mail each of your email accounts will appear here separately. You can then change if Badges are displaye on the Mail App - which will show you the number of emails - or not.
    Regards,
    Steve

  • Subtracting two timestamps and showing the number of hours between them.

    Hello Folks,
    What I have is two tables, each of them has a timestamp column. I want to do a select with a join that will show a column with the number of hours between the two times.
    (I have added the columns as timestamp(0) since I have no need for the decimals)
    Here's what I have:
    table one name: conc_test
    table one info:
    P_DATE-------JOB_NO-----MIX---POUR_NO----AMB_T---CONC_T--SLUMP---AIR---DENSITY---CYL_CAST_TIME
    09-MAR-10---9-12-796-----80----100309A------2.5--------16----------135------2.5----2501-------09-MAR-10 10.00.00 AM
    table two name: rls_break
    table two info:
    JOB_NO----POUR_NO-----CYL_ID----SPEC_STR---STR----MIX---BREAK_D_T
    9-12-796---100309A----100309A1------20-----------27-----80----10-MAR-10 07.15.00 AM
    (I put the --- between the columns so it would be more legible for forum reading, fyi)
    This is what I was trying to do:
    select
    rls_break.cyl_id "Cylinder ID",
    rls_break.mix "Mix",
    trunc(rls_break.break_d_t-conc_test.cyl_cast_time) "Age",
    rls_break.spec_str "Specified Strength",
    rls_break.str "Specimen Strength"
    from rls_break inner join conc_test on rls_break.pour_no = conc_test.pour_no
    where pour_no = '100309A';
    I want the "Age" column to show the total number of hours between the cast time (column cyl_cast_time from conc_test) and the break time (column break_d_t from rls_break)
    Thank's for any and all help.

    (I put the --- between the columns so it would be more legible for forum reading, fyi)Please put the tag before and after your examples.
    See: http://forums.oracle.com/forums/help.jspa for more information reagarding tags. (scroll a bit down)
    I want the "Age" column to show the total number of hours between the cast time (column cyl_cast_time from conc_test) and the break time (column
    break_d_t from rls_break)
    Do a search on 'NUMTODSINTERVAL' or 'time difference' on this forum, you'll find many related examples.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get the number of community members from outside the community

    Hi everyone.
    I need to know if there is any way to get the number of community members from outside the community, I mean, not using the "What's happening" webpart. I want to build up a page with a Webpart that summarize my three most visited communities indicating
    number of members, three last messages in the newsfeed, and number of posts in blog, wikis, document libraries, etc.
    Do I need statistics to get this kind of information? Should I use Sharepoint Object model instead?
    Here is an example of what I need:
    - Community name
    - Number of members
    - Community activity (messages, docs uploaded to library, etc)
    - Number of posts in calendar, blog, wiki that belongs to community
    Thank you all!

    Hi Thuan.
    Thanks for your answer but it does not help me because these communities are Sharepoint Communities not external sites so I need to get that information using SP object model and BCS in this case is useless.
    EDIT
    I found the solution using the search objects but I was only able to get members, discussions and replies
    using (ClientContext clientContext = new ClientContext("URL_OF_ENTERPRISE_SEARCH_CENTER"))
    KeywordQuery keywordQuery = new KeywordQuery(clientContext);
    keywordQuery.QueryText = "The_Name_of_the_Community WebTemplate:COMMUNITY";
    SearchExecutor searchExecutor = new SearchExecutor(clientContext);
    ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);
    clientContext.ExecuteQuery();
    System.Collections.Generic.IDictionary<string, object> ret = null;
    foreach (System.Collections.Generic.Dictionary<string, object> resultRow in results.Value[0].ResultRows)
    Console.WriteLine("{0}: {1} ({2})", resultRow["CommunityMembersCount"], resultRow["CommunityTopicsCount"], resultRow["CommunitiyRepliesCount"]);
    This is a Console Application.
    I hope someone helps

  • How can I show the number of version of document in the layout set iview?

    I have enabled the version of KM folder.
    I add the "rnd:icon,rnd:displayname(contentLink+rnd:action,contentlength,col:rating,rnd:collaborationstatus,modified,enhancedcollection,rnd:numberOfDocs" in document properties, but I would like to show the number of version.
    What is the property name of version number?
    Thank you for every answering,

    Hi Boonma,
    Pls refer to the http://forums.sdn.sap.com/thread.jspa?threadID=37904 thread.
    Thanks
    Prasad

Maybe you are looking for

  • How do you xfer info from ipad2 to iMac?  Is there a specific icon in iTunes for this?

    How do you xfer info from ipad2 to imac? Is there an icon on itunes to do this?

  • Multiple port for one instance

    hello there, Here is my requirement... If one of my master ldap went down for couple of hours and when i bring it up... all the arrowpoint traffic is routed immediately to this server and hence whatever changes happend in the secondary server was not

  • Opportunities and structured products

    We have created an Item Category and selected option "Single-Level Explosion Of Structured Product" for attribute "Structure Scope" under "Define Item Category". When we create an opportunity, the explosion of the product structure don't work. If we

  • Battery - 95% and still calculating

    I have OS 10.9 on my 1.2 ghz iBook G4. The battery is one of those replacements Apple gave us for that whole potential-burning-battery thing. I recently decided to switch the menubar battery indicator from percentage to time, and I've noticed somethi

  • Your free song balance is out of date

    I had a free song from Coca-cola, and have the "1 Song" icon up in the top right of the screen. I've redeemed the song, but the icon still remains, and now every time I click on "Get Song" I get the above error message and can't download the song. An